Table of Contents

Method GetQueryEmbeddingsAsync

Namespace
LMKit.Abstractions
Assembly
LM-Kit.NET.dll

GetQueryEmbeddingsAsync(string, CancellationToken)

Asynchronously generates the embedding vector for a search query, applying any query-specific instruction the model supports.

public virtual Task<float[]> GetQueryEmbeddingsAsync(string query, CancellationToken cancellationToken = default)

Parameters

query string

The query text to embed. Cannot be null or empty.

cancellationToken CancellationToken

Optional token to cancel the operation.

Returns

Task<float[]>

A task whose result is the query embedding vector.

Remarks

The default implementation reuses the passage path. Override it when the provider applies a distinct query instruction.

Share