Table of Contents

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

image ImageBuffer

The image to embed. Cannot be null.

cancellationToken CancellationToken

Optional token to cancel the operation.

Returns

Task<float[]>

A task whose result is the image embedding vector.

GetEmbeddingsAsync(IEnumerable<ImageBuffer>, CancellationToken)

Asynchronously generates embedding vectors for a batch of images.

Task<float[][]> GetEmbeddingsAsync(IEnumerable<ImageBuffer> images, CancellationToken cancellationToken = default)

Parameters

images IEnumerable<ImageBuffer>

The images to embed. Cannot be null or empty.

cancellationToken CancellationToken

Optional token to cancel the operation.

Returns

Task<float[][]>

A task whose result is an array of vectors, one per input image and in the same order.

Share