DelegatingEmbeddingGenerator<TInput,TEmbedding>.GenerateAsync Metodo

Definizione

Genera incorporamenti per ognuno degli elementi forniti values.

public virtual System.Threading.Tasks.Task<Microsoft.Extensions.AI.GeneratedEmbeddings<TEmbedding>> GenerateAsync(System.Collections.Generic.IEnumerable<TInput> values, Microsoft.Extensions.AI.EmbeddingGenerationOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GenerateAsync : seq<'Input> * Microsoft.Extensions.AI.EmbeddingGenerationOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Extensions.AI.GeneratedEmbeddings<'Embedding>>
override this.GenerateAsync : seq<'Input> * Microsoft.Extensions.AI.EmbeddingGenerationOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Extensions.AI.GeneratedEmbeddings<'Embedding>>
Public Overridable Function GenerateAsync (values As IEnumerable(Of TInput), Optional options As EmbeddingGenerationOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of GeneratedEmbeddings(Of TEmbedding))

Parametri

values
IEnumerable<TInput>

Sequenza di valori per cui generare incorporamenti.

options
EmbeddingGenerationOptions

Opzioni di generazione di incorporamento con cui configurare la richiesta.

cancellationToken
CancellationToken

Oggetto CancellationToken da monitorare per le richieste di annullamento. Il valore predefinito è None.

Valori restituiti

Task<GeneratedEmbeddings<TEmbedding>>

Incorporamenti generati.

Implementazioni

Si applica a