@@ -261,4 +261,116 @@ public async Task Tools_Books(ProviderType providerType)
261261
262262 Console . WriteLine ( response . Messages . AsHistory ( ) ) ;
263263 }
264+
265+ [ Explicit ]
266+ public async Task GoogleEmbeddingTest ( )
267+ {
268+ var ( llm , embeddingModel , _) = Helpers . GetModels ( ProviderType . Google ) ;
269+
270+ var embeddings = await embeddingModel . CreateEmbeddingsAsync ( new EmbeddingRequest ( )
271+ {
272+ Strings = new List < string >
273+ {
274+ "The quick brown fox jumps over the lazy dog." ,
275+ "She sells seashells by the seashore." ,
276+ "How much wood would a woodchuck chuck if a woodchuck could chuck wood?" ,
277+ "A journey of a thousand miles begins with a single step." ,
278+ "To be or not to be, that is the question." ,
279+ "All that glitters is not gold." ,
280+ "A picture is worth a thousand words." ,
281+ "Actions speak louder than words." ,
282+ "Better late than never." ,
283+ "The early bird catches the worm." ,
284+ "Fortune favors the bold." ,
285+ "Ignorance is bliss." ,
286+ "Look before you leap." ,
287+ "Barking up the wrong tree." ,
288+ "Birds of a feather flock together." ,
289+ "Don't bite the hand that feeds you." ,
290+ "Every cloud has a silver lining." ,
291+ "Haste makes waste." ,
292+ "Strike while the iron is hot." ,
293+ "Time and tide wait for no man." ,
294+ "When in Rome, do as the Romans do." ,
295+ "Where there's smoke, there's fire." ,
296+ "You can't judge a book by its cover." ,
297+ "Practice makes perfect." ,
298+ "Rome wasn't built in a day." ,
299+ "Two heads are better than one." ,
300+ "A rolling stone gathers no moss." ,
301+ "Absence makes the heart grow fonder." ,
302+ "Beauty is in the eye of the beholder." ,
303+ "Cleanliness is next to godliness." ,
304+ "Curiosity killed the cat." ,
305+ "Don't count your chickens before they hatch." ,
306+ "Honesty is the best policy." ,
307+ "Necessity is the mother of invention." ,
308+ "No man is an island." ,
309+ "The pen is mightier than the sword." ,
310+ "The squeaky wheel gets the grease." ,
311+ "There's no place like home." ,
312+ "Too many cooks spoil the broth." ,
313+ "You can't have your cake and eat it too." ,
314+ "A fool and his money are soon parted." ,
315+ "Actions have consequences." ,
316+ "An apple a day keeps the doctor away." ,
317+ "As you sow, so shall you reap." ,
318+ "Don't bite off more than you can chew." ,
319+ "Don't put all your eggs in one basket." ,
320+ "Early to bed and early to rise makes a man healthy, wealthy, and wise." ,
321+ "Give credit where credit is due." ,
322+ "Good things come to those who wait." ,
323+ "If it ain't broke, don't fix it." ,
324+ "If you can't beat 'em, join 'em." ,
325+ "It's always darkest before the dawn." ,
326+ "Keep your friends close and your enemies closer." ,
327+ "Knowledge is power." ,
328+ "Laughter is the best medicine." ,
329+ "Let sleeping dogs lie." ,
330+ "Out of sight, out of mind." ,
331+ "The grass is always greener on the other side of the fence." ,
332+ "The road to hell is paved with good intentions." ,
333+ "Variety is the spice of life." ,
334+ "What goes around comes around." ,
335+ "You reap what you sow." ,
336+ "Every rose has its thorn." ,
337+ "Don't judge a person until you've walked a mile in their shoes." ,
338+ "A watched pot never boils." ,
339+ "Better safe than sorry." ,
340+ "Beggars can't be choosers." ,
341+ "Cut your coat according to your cloth." ,
342+ "Don't make a mountain out of a molehill." ,
343+ "Every dog has its day." ,
344+ "Great minds think alike." ,
345+ "If it sounds too good to be true, it probably is." ,
346+ "Lend your money and lose your friend." ,
347+ "Keep your chin up." ,
348+ "Actions create reactions." ,
349+ "Don't throw the baby out with the bathwater." ,
350+ "A stitch in time saves nine." ,
351+ "Out of the frying pan and into the fire." ,
352+ "The customer is always right." ,
353+ "The proof of the pudding is in the eating." ,
354+ "There's no such thing as a free lunch." ,
355+ "This too shall pass." ,
356+ "To err is human; to forgive, divine." ,
357+ "You can't please everyone." ,
358+ "What doesn't kill you makes you stronger." ,
359+ "Don't cry over spilled milk." ,
360+ "Good fences make good neighbors." ,
361+ "Hope for the best but prepare for the worst." ,
362+ "It's no use crying over spilt milk." ,
363+ "Life is what you make it." ,
364+ "Live and let live." ,
365+ "Never look a gift horse in the mouth." ,
366+ "When the going gets tough, the tough get going." ,
367+ "You can't have it both ways." ,
368+ "You can't make an omelette without breaking eggs." ,
369+ "Necessity knows no law." ,
370+ "Failing to prepare is preparing to fail."
371+ }
372+ } ) ;
373+ embeddings . Values . Should ( ) . HaveCountGreaterThan ( 0 ) ;
374+ embeddings . Values . First ( ) . Should ( ) . HaveCountGreaterThan ( 0 ) ;
375+ }
264376}
0 commit comments