Table of Contents

Class EmbeddingEngine

Namespace
Uralstech.UAI.LiteRTLM
public sealed class EmbeddingEngine : LiteRTLMNativeHandle
Inheritance
object
EmbeddingEngine
Inherited Members

Constructors

EmbeddingEngine(EmbeddingEngineSettings)

Creates a managed wrapper around a LiteRT LM embedding engine from the given settings. The caller is responsible for disposing the wrapper using Dispose().

public EmbeddingEngine(EmbeddingEngineSettings settings)

Parameters

settings EmbeddingEngineSettings

The engine settings.

Exceptions

InvalidOperationException

Thrown if the native object could not be created.

Methods

ComputeEmbedding(IReadOnlyList<InputData>, EmbeddingOptions?)

Computes embedding response for a single request.

public EmbeddingResponse? ComputeEmbedding(IReadOnlyList<InputData> inputs, EmbeddingOptions? options = null)

Parameters

inputs IReadOnlyList<InputData>

Array of InputData representing multimodal input.

options EmbeddingOptions

Optional embedding options. If null, default options are used.

Returns

EmbeddingResponse

The embedding response, or null on failure. The caller is responsible for deleting the response using Dispose().

ComputeEmbeddingBatch(IReadOnlyList<IReadOnlyList<InputData>>, EmbeddingOptions?)

Computes embedding responses for a batch of requests.

public EmbeddingResponses? ComputeEmbeddingBatch(IReadOnlyList<IReadOnlyList<InputData>> inputBatches, EmbeddingOptions? options = null)

Parameters

inputBatches IReadOnlyList<IReadOnlyList<InputData>>

An array of arrays of InputData.

options EmbeddingOptions

Optional embedding options. If null, default options are used.

Returns

EmbeddingResponses

The batch responses, or null on failure. The caller is responsible for deleting responses using Dispose().

ReleaseUnmanagedResources()

protected override void ReleaseUnmanagedResources()