HuggingFaceEmbeddingGenerationService
Wisej.AI.Services.HuggingFaceEmbeddingGenerationService
Last updated
Wisej.AI.Services.HuggingFaceEmbeddingGenerationService
Last updated
Namespace: Wisej.AI.Services
Assembly: Wisej.AI (3.5.0.0)
Represents a service for generating embeddings using the Hugging Face API.
This class implements the interface and provides methods to generate embeddings from text chunks using the Hugging Face API.
Initializes a new instance of the class with an optional URL.
url
The base URL of the Hugging Face API. Default is null
.
: Gets or sets the maximum size of the array that can be processed in a single request. (Default: 100
)
: Gets or sets the base URL of the Hugging Face API. (Default: null
)
Asynchronously generates embeddings for the provided text chunks.
chunks
An array of text chunks to generate embeddings for.
This method handles chunking of input data and parallelizes requests if necessary. It combines results from multiple requests if the input exceeds the maximum array size.
Represents a service capable of generating embeddings from provided text chunks.
: Gets or sets the size of the vector for the embeddings. This property is not used. (Default: 0
)
Returns: . A task that represents the asynchronous operation. The task result contains the generated .