ConfigureOptionsEmbeddingGeneratorBuilderExtensions.ConfigureOptions<TInput,TEmbedding> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a callback that configures a EmbeddingGenerationOptions to be passed to the next client in the pipeline.
public:
generic <typename TInput, typename TEmbedding>
where TEmbedding : Microsoft::Extensions::AI::Embedding[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::AI::EmbeddingGeneratorBuilder<TInput, TEmbedding> ^ ConfigureOptions(Microsoft::Extensions::AI::EmbeddingGeneratorBuilder<TInput, TEmbedding> ^ builder, Action<Microsoft::Extensions::AI::EmbeddingGenerationOptions ^> ^ configure);
public static Microsoft.Extensions.AI.EmbeddingGeneratorBuilder<TInput,TEmbedding> ConfigureOptions<TInput,TEmbedding> (this Microsoft.Extensions.AI.EmbeddingGeneratorBuilder<TInput,TEmbedding> builder, Action<Microsoft.Extensions.AI.EmbeddingGenerationOptions> configure) where TEmbedding : Microsoft.Extensions.AI.Embedding;
static member ConfigureOptions : Microsoft.Extensions.AI.EmbeddingGeneratorBuilder<'Input, 'Embedding (requires 'Embedding :> Microsoft.Extensions.AI.Embedding)> * Action<Microsoft.Extensions.AI.EmbeddingGenerationOptions> -> Microsoft.Extensions.AI.EmbeddingGeneratorBuilder<'Input, 'Embedding (requires 'Embedding :> Microsoft.Extensions.AI.Embedding)> (requires 'Embedding :> Microsoft.Extensions.AI.Embedding)
<Extension()>
Public Function ConfigureOptions(Of TInput, TEmbedding) (builder As EmbeddingGeneratorBuilder(Of TInput, TEmbedding), configure As Action(Of EmbeddingGenerationOptions)) As EmbeddingGeneratorBuilder(Of TInput, TEmbedding)
Type Parameters
- TInput
The type of the input passed to the generator.
- TEmbedding
The type of the embedding instance produced by the generator.
Parameters
- configure
- Action<EmbeddingGenerationOptions>
The delegate to invoke to configure the EmbeddingGenerationOptions instance. It is passed a clone of the caller-supplied
EmbeddingGenerationOptions instance (or a new constructed instance if the caller-supplied instance is null
).
Returns
The builder
.
Remarks
This can be used to set default options. The configure
delegate is passed either a new instance of EmbeddingGenerationOptions if the caller didn't supply a EmbeddingGenerationOptions instance, or a clone (via Clone() of the caller-supplied instance if one was supplied.
Applies to
.NET