Method GetEmbeddingsAsync
- Namespace
- LMKit.Abstractions
- Assembly
- LM-Kit.NET.dll
GetEmbeddingsAsync(ImageBuffer, CancellationToken)
Asynchronously generates the embedding vector for a single image.
Task<float[]> GetEmbeddingsAsync(ImageBuffer image, CancellationToken cancellationToken = default)
Parameters
imageImageBufferThe image to embed. Cannot be null.
cancellationTokenCancellationTokenOptional token to cancel the operation.
Returns
GetEmbeddingsAsync(IEnumerable<ImageBuffer>, CancellationToken)
Asynchronously generates embedding vectors for a batch of images.
Task<float[][]> GetEmbeddingsAsync(IEnumerable<ImageBuffer> images, CancellationToken cancellationToken = default)
Parameters
imagesIEnumerable<ImageBuffer>The images to embed. Cannot be null or empty.
cancellationTokenCancellationTokenOptional token to cancel the operation.