Class EmbeddingEngine
- Namespace
- Uralstech.UAI.LiteRTLM
public sealed class EmbeddingEngine : LiteRTLMNativeHandle
- Inheritance
-
objectEmbeddingEngine
- 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
settingsEmbeddingEngineSettingsThe 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
inputsIReadOnlyList<InputData>Array of InputData representing multimodal input.
optionsEmbeddingOptionsOptional 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
inputBatchesIReadOnlyList<IReadOnlyList<InputData>>An array of arrays of InputData.
optionsEmbeddingOptionsOptional 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()