6 instantiations of OllamaEmbeddingGenerator
Microsoft.Extensions.AI.Ollama.Tests (6)
OllamaEmbeddingGeneratorIntegrationTests.cs (1)
12
new
OllamaEmbeddingGenerator
(endpoint, "all-minilm") :
OllamaEmbeddingGeneratorTests.cs (5)
20
Assert.Throws<ArgumentNullException>("endpoint", () => new
OllamaEmbeddingGenerator
((string)null!));
21
Assert.Throws<ArgumentException>("modelId", () => new
OllamaEmbeddingGenerator
(new Uri("http://localhost"), " "));
27
using OllamaEmbeddingGenerator generator =
new
("http://localhost");
52
using IEmbeddingGenerator<string, Embedding<float>> chatClient = new
OllamaEmbeddingGenerator
(endpoint, model);
80
using IEmbeddingGenerator<string, Embedding<float>> generator = new
OllamaEmbeddingGenerator
("http://localhost:11434", "all-minilm", httpClient);
5 references to OllamaEmbeddingGenerator
Microsoft.Extensions.AI.Ollama (2)
OllamaEmbeddingGenerator.cs (2)
24
/// <summary>Initializes a new instance of the <see cref="
OllamaEmbeddingGenerator
"/> class.</summary>
36
/// <summary>Initializes a new instance of the <see cref="
OllamaEmbeddingGenerator
"/> class.</summary>
Microsoft.Extensions.AI.Ollama.Tests (3)
OllamaEmbeddingGeneratorTests.cs (3)
27
using
OllamaEmbeddingGenerator
generator = new("http://localhost");
29
Assert.Same(generator, generator.GetService<
OllamaEmbeddingGenerator
>());
42
Assert.Same(generator, pipeline.GetService<
OllamaEmbeddingGenerator
>());