Skip to content

Commit 0957664

Browse files
author
wisedev
committed
fix: change gemini embedding to supported model
1 parent b198073 commit 0957664

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

Examples/Examples/Chat/ChatWithFilesExampleGemini.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,12 @@ public async Task Start()
1313

1414
List<string> files = ["./Files/Nicolaus_Copernicus.pdf", "./Files/Galileo_Galilei.pdf"];
1515

16-
var result = await AIHub.Chat()
16+
await AIHub.Chat()
1717
.WithModel<Gemini2_5Flash>()
1818
.WithMessage("You have 2 documents in memory. Whats the difference of work between Galileo and Copernicus?. Give answer based on the documents.")
1919
.WithFiles(files)
2020
.CompleteAsync(interactive: true);
2121

22-
Console.WriteLine(result.Message.Content);
2322
Console.ReadKey();
2423
}
2524
}

src/MaIN.Core/.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package>
33
<metadata>
44
<id>MaIN.NET</id>
5-
<version>0.9.3</version>
5+
<version>0.9.4</version>
66
<authors>Wisedev</authors>
77
<owners>Wisedev</owners>
88
<icon>favicon.png</icon>

src/MaIN.Services/Services/LLMService/Memory/MemoryFactory.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ public IKernelMemory CreateMemoryWithGemini(string geminiKey, MemoryParams memor
6868
.WithSearchClientConfig(searchOptions)
6969
#pragma warning disable SKEXP0070 // For evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
7070
.WithSemanticKernelTextGenerationService(
71-
new GeminiTextGeneratorAdapter(new GoogleAIGeminiChatCompletionService("gemini-2.0-flash", geminiKey)),
71+
new GeminiTextGeneratorAdapter(new GoogleAIGeminiChatCompletionService("gemini-2.5-flash", geminiKey)),
7272
new SemanticKernelConfig())
7373
.WithSemanticKernelTextEmbeddingGenerationService(
74-
new GoogleAITextEmbeddingGenerationService("embedding-001", geminiKey), new SemanticKernelConfig())
74+
new GoogleAITextEmbeddingGenerationService("gemini-embedding-001", geminiKey), new SemanticKernelConfig())
7575
#pragma warning restore SKEXP0070
7676
.WithSimpleVectorDb()
7777
.Build();

0 commit comments

Comments
 (0)