Partager via


EmbeddingGeneratorBuilderEmbeddingGeneratorExtensions.AsBuilder<TInput,TEmbedding> Method

Definition

Creates a new EmbeddingGeneratorBuilder<TInput,TEmbedding> using innerGenerator as its inner generator.

public:
generic <typename TInput, typename TEmbedding>
 where TEmbedding : Microsoft::Extensions::AI::Embedding[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::AI::EmbeddingGeneratorBuilder<TInput, TEmbedding> ^ AsBuilder(Microsoft::Extensions::AI::IEmbeddingGenerator<TInput, TEmbedding> ^ innerGenerator);
public static Microsoft.Extensions.AI.EmbeddingGeneratorBuilder<TInput,TEmbedding> AsBuilder<TInput,TEmbedding> (this Microsoft.Extensions.AI.IEmbeddingGenerator<TInput,TEmbedding> innerGenerator) where TEmbedding : Microsoft.Extensions.AI.Embedding;
static member AsBuilder : Microsoft.Extensions.AI.IEmbeddingGenerator<'Input, 'Embedding (requires 'Embedding :> Microsoft.Extensions.AI.Embedding)> -> Microsoft.Extensions.AI.EmbeddingGeneratorBuilder<'Input, 'Embedding (requires 'Embedding :> Microsoft.Extensions.AI.Embedding)> (requires 'Embedding :> Microsoft.Extensions.AI.Embedding)
<Extension()>
Public Function AsBuilder(Of TInput, TEmbedding) (innerGenerator As IEmbeddingGenerator(Of TInput, TEmbedding)) As EmbeddingGeneratorBuilder(Of TInput, TEmbedding)

Type Parameters

TInput

The type from which embeddings will be generated.

TEmbedding

The type of embeddings to generate.

Parameters

innerGenerator
IEmbeddingGenerator<TInput,TEmbedding>

The generator to use as the inner generator.

Returns

The new EmbeddingGeneratorBuilder<TInput,TEmbedding> instance.

Remarks

This method is equivalent to using the EmbeddingGeneratorBuilder<TInput,TEmbedding> constructor directly, specifying innerGenerator as the inner generator.

Applies to