EmbeddingGeneratorExtensions.GenerateEmbeddingVectorAsync<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<ReadOnlyMemory<TEmbedding>> GenerateEmbeddingVectorAsync<TInput,TEmbedding> (this Microsoft.Extensions.AI.IEmbeddingGenerator<TInput,Microsoft.Extensions.AI.Embedding<TEmbedding>> generator, TInput value, Microsoft.Extensions.AI.EmbeddingGenerationOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
static member GenerateEmbeddingVectorAsync : Microsoft.Extensions.AI.IEmbeddingGenerator<'Input, Microsoft.Extensions.AI.Embedding<'Embedding>> * 'Input * Microsoft.Extensions.AI.EmbeddingGenerationOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<ReadOnlyMemory<'Embedding>>
<Extension()>
Public Function GenerateEmbeddingVectorAsync(Of TInput, TEmbedding) (generator As IEmbeddingGenerator(Of TInput, Embedding(Of TEmbedding)), value As TInput, Optional options As EmbeddingGenerationOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ReadOnlyMemory(Of TEmbedding))
Type Parameters
- TInput
- TEmbedding
Parameters
- generator
- IEmbeddingGenerator<TInput,Embedding<TEmbedding>>
- value
- TInput
- options
- EmbeddingGenerationOptions
- cancellationToken
- CancellationToken
Returns
Task<ReadOnlyMemory<TEmbedding>>
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.