8 instantiations of EmbeddingGeneratorBuilder
Microsoft.Extensions.AI (3)
Embeddings\EmbeddingGeneratorBuilderEmbeddingGeneratorExtensions.cs (1)
31
return new
EmbeddingGeneratorBuilder
<TInput, TEmbedding>(innerGenerator);
Embeddings\EmbeddingGeneratorBuilderServiceCollectionExtensions.cs (2)
41
var builder = new
EmbeddingGeneratorBuilder
<TInput, TEmbedding>(innerGeneratorFactory);
79
var builder = new
EmbeddingGeneratorBuilder
<TInput, TEmbedding>(innerGeneratorFactory);
Microsoft.Extensions.AI.Tests (5)
Embeddings\EmbeddingGeneratorBuilderTests.cs (3)
19
var builder = new
EmbeddingGeneratorBuilder
<string, Embedding<float>>(services =>
60
Assert.Throws<ArgumentNullException>("innerGenerator", () => new
EmbeddingGeneratorBuilder
<string, Embedding<float>>((IEmbeddingGenerator<string, Embedding<float>>)null!));
68
() => new
EmbeddingGeneratorBuilder
<string, Embedding<float>>((Func<IServiceProvider, IEmbeddingGenerator<string, Embedding<float>>>)null!));
Embeddings\UseDelegateEmbeddingGeneratorTests.cs (2)
18
EmbeddingGeneratorBuilder<string, Embedding<float>> builder =
new
(generator);
52
using IEmbeddingGenerator<string, Embedding<float>> generator = new
EmbeddingGeneratorBuilder
<string, Embedding<float>>(innerGenerator)
43 references to EmbeddingGeneratorBuilder
Microsoft.Extensions.AI (38)
Embeddings\ConfigureOptionsEmbeddingGeneratorBuilderExtensions.cs (3)
19
/// <param name="builder">The <see cref="
EmbeddingGeneratorBuilder
{TInput, TEmbedding}"/>.</param>
31
public static
EmbeddingGeneratorBuilder
<TInput, TEmbedding> ConfigureOptions<TInput, TEmbedding>(
32
this
EmbeddingGeneratorBuilder
<TInput, TEmbedding> builder,
Embeddings\DistributedCachingEmbeddingGeneratorBuilderExtensions.cs (4)
22
/// <param name="builder">The <see cref="
EmbeddingGeneratorBuilder
{TInput, TEmbedding}"/>.</param>
27
/// <returns>The <see cref="
EmbeddingGeneratorBuilder
{TInput, TEmbedding}"/> provided as <paramref name="builder"/>.</returns>
28
public static
EmbeddingGeneratorBuilder
<TInput, TEmbedding> UseDistributedCache<TInput, TEmbedding>(
29
this
EmbeddingGeneratorBuilder
<TInput, TEmbedding> builder,
Embeddings\EmbeddingGeneratorBuilder.cs (10)
23
/// <summary>Initializes a new instance of the <see cref="
EmbeddingGeneratorBuilder
{TInput, TEmbedding}"/> class.</summary>
24
/// <param name="innerGenerator">The inner <see cref="
EmbeddingGeneratorBuilder
{TInput, TEmbedding}"/> that represents the underlying backend.</param>
31
/// <summary>Initializes a new instance of the <see cref="
EmbeddingGeneratorBuilder
{TInput, TEmbedding}"/> class.</summary>
32
/// <param name="innerGeneratorFactory">A callback that produces the inner <see cref="
EmbeddingGeneratorBuilder
{TInput, TEmbedding}"/> that represents the underlying backend.</param>
68
/// <returns>The updated <see cref="
EmbeddingGeneratorBuilder
{TInput, TEmbedding}"/> instance.</returns>
69
public
EmbeddingGeneratorBuilder
<TInput, TEmbedding> Use(Func<IEmbeddingGenerator<TInput, TEmbedding>, IEmbeddingGenerator<TInput, TEmbedding>> generatorFactory)
78
/// <returns>The updated <see cref="
EmbeddingGeneratorBuilder
{TInput, TEmbedding}"/> instance.</returns>
79
public
EmbeddingGeneratorBuilder
<TInput, TEmbedding> Use(
96
/// <returns>The updated <see cref="
EmbeddingGeneratorBuilder
{TInput, TEmbedding}"/> instance.</returns>
98
public
EmbeddingGeneratorBuilder
<TInput, TEmbedding> Use(
Embeddings\EmbeddingGeneratorBuilderEmbeddingGeneratorExtensions.cs (5)
10
/// in the context of <see cref="
EmbeddingGeneratorBuilder
{TInput, TEmbedding}"/>.</summary>
14
/// Creates a new <see cref="
EmbeddingGeneratorBuilder
{TInput, TEmbedding}"/> using
20
/// <returns>The new <see cref="
EmbeddingGeneratorBuilder
{TInput, TEmbedding}"/> instance.</returns>
22
/// This method is equivalent to using the <see cref="
EmbeddingGeneratorBuilder
{TInput, TEmbedding}"/>
25
public static
EmbeddingGeneratorBuilder
<TInput, TEmbedding> AsBuilder<TInput, TEmbedding>(
Embeddings\EmbeddingGeneratorBuilderServiceCollectionExtensions.cs (10)
18
/// <returns>An <see cref="
EmbeddingGeneratorBuilder
{TInput, TEmbedding}"/> that can be used to build a pipeline around the inner generator.</returns>
20
public static
EmbeddingGeneratorBuilder
<TInput, TEmbedding> AddEmbeddingGenerator<TInput, TEmbedding>(
31
/// <returns>An <see cref="
EmbeddingGeneratorBuilder
{TInput, TEmbedding}"/> that can be used to build a pipeline around the inner generator.</returns>
33
public static
EmbeddingGeneratorBuilder
<TInput, TEmbedding> AddEmbeddingGenerator<TInput, TEmbedding>(
41
var
builder = new EmbeddingGeneratorBuilder<TInput, TEmbedding>(innerGeneratorFactory);
52
/// <returns>An <see cref="
EmbeddingGeneratorBuilder
{TInput, TEmbedding}"/> that can be used to build a pipeline around the inner generator.</returns>
54
public static
EmbeddingGeneratorBuilder
<TInput, TEmbedding> AddKeyedEmbeddingGenerator<TInput, TEmbedding>(
67
/// <returns>An <see cref="
EmbeddingGeneratorBuilder
{TInput, TEmbedding}"/> that can be used to build a pipeline around the inner generator.</returns>
69
public static
EmbeddingGeneratorBuilder
<TInput, TEmbedding> AddKeyedEmbeddingGenerator<TInput, TEmbedding>(
79
var
builder = new EmbeddingGeneratorBuilder<TInput, TEmbedding>(innerGeneratorFactory);
Embeddings\LoggingEmbeddingGeneratorBuilderExtensions.cs (3)
17
/// <param name="builder">The <see cref="
EmbeddingGeneratorBuilder
{TInput, TEmbedding}"/>.</param>
24
public static
EmbeddingGeneratorBuilder
<TInput, TEmbedding> UseLogging<TInput, TEmbedding>(
25
this
EmbeddingGeneratorBuilder
<TInput, TEmbedding> builder,
Embeddings\OpenTelemetryEmbeddingGeneratorBuilderExtensions.cs (3)
23
/// <param name="builder">The <see cref="
EmbeddingGeneratorBuilder
{TInput, TEmbedding}"/>.</param>
28
public static
EmbeddingGeneratorBuilder
<TInput, TEmbedding> UseOpenTelemetry<TInput, TEmbedding>(
29
this
EmbeddingGeneratorBuilder
<TInput, TEmbedding> builder,
Microsoft.Extensions.AI.Tests (5)
Embeddings\ConfigureOptionsEmbeddingGeneratorTests.cs (1)
24
var
builder = innerGenerator.AsBuilder();
Embeddings\EmbeddingGeneratorBuilderTests.cs (3)
19
var
builder = new EmbeddingGeneratorBuilder<string, Embedding<float>>(services =>
39
var
builder = expectedInnerGenerator.AsBuilder();
75
var
builder = innerGenerator.AsBuilder();
Embeddings\UseDelegateEmbeddingGeneratorTests.cs (1)
18
EmbeddingGeneratorBuilder
<string, Embedding<float>> builder = new(generator);