Method GetDocumentEmbeddingsAsync
- Namespace
- LMKit.Abstractions
- Assembly
- LM-Kit.NET.dll
GetDocumentEmbeddingsAsync(string, CancellationToken)
Asynchronously generates the embedding vector for one document/passage, applying any document-specific instruction the model supports.
Task<float[]> GetDocumentEmbeddingsAsync(string text, CancellationToken cancellationToken = default)
Parameters
textstringThe document text to embed. Cannot be null or empty.
cancellationTokenCancellationTokenOptional token to cancel the operation.
Returns
GetDocumentEmbeddingsAsync(IEnumerable<string>, CancellationToken)
Asynchronously generates embedding vectors for a batch of documents/passages, applying any document-specific instruction the model supports.
Task<float[][]> GetDocumentEmbeddingsAsync(IEnumerable<string> texts, CancellationToken cancellationToken = default)
Parameters
textsIEnumerable<string>The document texts to embed. Cannot be null or empty.
cancellationTokenCancellationTokenOptional token to cancel the operation.