IEmbeddingGenerationService
Wisej.AI.Services.IEmbeddingGenerationService
Namespace: Wisej.AI.Services
Assembly: Wisej.AI (3.5.0.0)
Represents a service capable of generating embeddings from provided text chunks.
public interface IEmbeddingGenerationService
Properties
Endpoint

SmartEndpoint: Gets or sets the endpoint configuration for the embedding generation service.
MaxArraySize

Int32: Gets or sets the maximum number of text chunks that can be sent as an array to the provider.
VectorSize

Int32: Gets or sets the dimension of the embedding vectors.
Methods
EmbedAsync(chunks)

Asynchronously generates an embedding from the specified array of text chunks.
chunks
An array of strings representing the text chunks to be embedded. The array can be empty.
Returns: Task<Embedding>. A task representing the asynchronous operation, with a result of type Embedding.
This method processes the supplied text chunks and returns an embedding that captures the semantic information contained within the text. Usage example:
IEmbeddingGenerationService embeddingService = new EmbeddingGenerationServiceImplementation();
embeddingService.Endpoint = new SmartEndpoint("http://example.com/api");
string[] textChunks = { "This is a sample text.", "Another piece of text." };
Embedding result = await embeddingService.EmbedAsync(textChunks);
Note that the quality and characteristics of the generated embedding depend on the implementation details of the embedding service.
Implemented By
Represents a service that provides functionality to generate embeddings for given text inputs using a SmartEndpoint
Represents a service for generating embeddings using the Hugging Face API.
Last updated