7 instantiations of OpenAIEmbeddingGenerator
Microsoft.Extensions.AI.OpenAI (2)
OpenAIClientExtensions.cs (2)
32
new
OpenAIEmbeddingGenerator
(openAIClient, modelId, dimensions);
39
new
OpenAIEmbeddingGenerator
(embeddingClient, dimensions);
Microsoft.Extensions.AI.OpenAI.Tests (5)
OpenAIEmbeddingGeneratorTests.cs (5)
25
Assert.Throws<ArgumentNullException>("openAIClient", () => new
OpenAIEmbeddingGenerator
(null!, "model"));
26
Assert.Throws<ArgumentNullException>("embeddingClient", () => new
OpenAIEmbeddingGenerator
(null!));
29
Assert.Throws<ArgumentNullException>("modelId", () => new
OpenAIEmbeddingGenerator
(openAIClient, null!));
30
Assert.Throws<ArgumentException>("modelId", () => new
OpenAIEmbeddingGenerator
(openAIClient, ""));
31
Assert.Throws<ArgumentException>("modelId", () => new
OpenAIEmbeddingGenerator
(openAIClient, " "));
3 references to OpenAIEmbeddingGenerator
Microsoft.Extensions.AI.OpenAI (2)
OpenAIEmbeddingGenerator.cs (2)
34
/// <summary>Initializes a new instance of the <see cref="
OpenAIEmbeddingGenerator
"/> class.</summary>
63
/// <summary>Initializes a new instance of the <see cref="
OpenAIEmbeddingGenerator
"/> class.</summary>
Microsoft.Extensions.AI.OpenAI.Tests (1)
OpenAIEmbeddingGeneratorTests.cs (1)
75
Assert.Same(embeddingGenerator, embeddingGenerator.GetService<
OpenAIEmbeddingGenerator
>());