EmbeddingGeneratorExtensions.GenerateAndZipAsync<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.
public static System.Threading.Tasks.Task<(TInput Value, TEmbedding Embedding)[]> GenerateAndZipAsync<TInput,TEmbedding> (this Microsoft.Extensions.AI.IEmbeddingGenerator<TInput,TEmbedding> generator, System.Collections.Generic.IEnumerable<TInput> values, Microsoft.Extensions.AI.EmbeddingGenerationOptions? options = default, System.Threading.CancellationToken cancellationToken = default) where TEmbedding : Microsoft.Extensions.AI.Embedding;
static member GenerateAndZipAsync : Microsoft.Extensions.AI.IEmbeddingGenerator<'Input, 'Embedding (requires 'Embedding :> Microsoft.Extensions.AI.Embedding)> * seq<'Input> * Microsoft.Extensions.AI.EmbeddingGenerationOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<ValueTuple<'Input, 'Embedding>[]> (requires 'Embedding :> Microsoft.Extensions.AI.Embedding)
<Extension()>
Public Function GenerateAndZipAsync(Of TInput, TEmbedding) (generator As IEmbeddingGenerator(Of TInput, TEmbedding), values As IEnumerable(Of TInput), Optional options As EmbeddingGenerationOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ValueTuple(Of TInput, TEmbedding)())
Type Parameters
- TInput
- TEmbedding
Parameters
- generator
- IEmbeddingGenerator<TInput,TEmbedding>
- values
- IEnumerable<TInput>
- options
- EmbeddingGenerationOptions
- cancellationToken
- CancellationToken
Returns
Task<ValueTuple<TInput,TEmbedding>[]>
Applies to
Samarbeta med oss på GitHub
Källan för det här innehållet finns på GitHub, där du även kan skapa och granska ärenden och pull-begäranden. Se vår deltagarguide för mer information.