From 486607d7cfaae1e292712a68d813da692631e378 Mon Sep 17 00:00:00 2001 From: Yuriy Lyeshchenko Date: Sat, 8 Mar 2025 10:06:28 -0600 Subject: [PATCH] Use prompt from the list of prompts instead of the same prompt --- .../ollama/OllamaExamples/TextEmbeddingCaching.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/microsoft-extensions-ai/ollama/OllamaExamples/TextEmbeddingCaching.cs b/src/microsoft-extensions-ai/ollama/OllamaExamples/TextEmbeddingCaching.cs index 25f9fa1e..7a12525f 100644 --- a/src/microsoft-extensions-ai/ollama/OllamaExamples/TextEmbeddingCaching.cs +++ b/src/microsoft-extensions-ai/ollama/OllamaExamples/TextEmbeddingCaching.cs @@ -23,7 +23,7 @@ public static async Task TextEmbeddingCaching() foreach(var prompt in prompts) { - var embedding = await generator.GenerateEmbeddingVectorAsync("What is AI?"); + var embedding = await generator.GenerateEmbeddingVectorAsync(prompt); Console.WriteLine(string.Join(", ", embedding.ToArray())); }