Method GetEmbeddingsAsync
- Namespace
- LMKit.Abstractions
- Assembly
- LM-Kit.NET.dll
GetEmbeddingsAsync(IList<int>, CancellationToken)
Asynchronously generates the embedding vector for a pre-tokenized passage.
Task<float[]> GetEmbeddingsAsync(IList<int> tokens, CancellationToken cancellationToken = default)
Parameters
tokensIList<int>The token list to embed. Cannot be null or empty.
cancellationTokenCancellationTokenOptional token to cancel the operation.
Returns
GetEmbeddingsAsync(IEnumerable<IList<int>>, CancellationToken)
Asynchronously generates embedding vectors for a batch of pre-tokenized passages.
Task<float[][]> GetEmbeddingsAsync(IEnumerable<IList<int>> tokens, CancellationToken cancellationToken = default)
Parameters
tokensIEnumerable<IList<int>>The token lists to embed. Cannot be null or empty.
cancellationTokenCancellationTokenOptional token to cancel the operation.