IEmbeddingGenerationService<TValue,TEmbedding>.GenerateEmbeddingsAsync 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.
Generates an embedding from the given data
.
public System.Threading.Tasks.Task<System.Collections.Generic.IList<ReadOnlyMemory<TEmbedding>>> GenerateEmbeddingsAsync (System.Collections.Generic.IList<TValue> data, Microsoft.SemanticKernel.Kernel? kernel = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GenerateEmbeddingsAsync : System.Collections.Generic.IList<'Value> * Microsoft.SemanticKernel.Kernel * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IList<ReadOnlyMemory<'Embedding>>>
Public Function GenerateEmbeddingsAsync (data As IList(Of TValue), Optional kernel As Kernel = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IList(Of ReadOnlyMemory(Of TEmbedding)))
Parameters
- data
- IList<TValue>
List of strings to generate embeddings for
- kernel
- Kernel
The Kernel containing services, plugins, and other state for use throughout the operation.
- cancellationToken
- CancellationToken
The CancellationToken to monitor for cancellation requests. The default is None.
Returns
List of embeddings