Table of Contents

Class VllmEmbeddingProvider

Namespace
Mythosia.AI.Rag.Embeddings
Assembly
Mythosia.AI.Rag.dll
public class VllmEmbeddingProvider : IEmbeddingProvider
Inheritance
VllmEmbeddingProvider
Implements
Inherited Members

Constructors

VllmEmbeddingProvider(HttpClient, string, int, string)

public VllmEmbeddingProvider(HttpClient httpClient, string model = "Qwen/Qwen3-Embedding-0.6B", int dimensions = 1024, string baseUrl = "http://localhost:8002")

Parameters

httpClient HttpClient
model string
dimensions int
baseUrl string

Properties

Dimensions

The dimensionality of the embedding vectors produced by this provider.

public int Dimensions { get; }

Property Value

int

Methods

GetEmbeddingAsync(string, CancellationToken)

Generates an embedding vector for a single text input.

public Task<float[]> GetEmbeddingAsync(string text, CancellationToken cancellationToken = default)

Parameters

text string
cancellationToken CancellationToken

Returns

Task<float[]>

GetEmbeddingsAsync(IEnumerable<string>, CancellationToken)

Generates embedding vectors for multiple text inputs in a single batch call.

public Task<IReadOnlyList<float[]>> GetEmbeddingsAsync(IEnumerable<string> texts, CancellationToken cancellationToken = default)

Parameters

texts IEnumerable<string>
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<float[]>>