HuggingFaceEmbeddingModel<T>
Models & Types ยท AiDotNet.RetrievalAugmentedGeneration.EmbeddingModels
HuggingFace-based embedding model for generating embeddings via Inference API.
Inheritance: EmbeddingModelBase<T> โ HuggingFaceEmbeddingModel<T>
Constructors
| Constructor | Summary |
|---|---|
HuggingFaceEmbeddingModel(string modelName, string apiKey, int dimension, int maxTokens, HttpClient httpClient) |
Properties
| Property | Summary |
|---|---|
int EmbeddingDimension { get; } |
|
int MaxTokens { get; } |
Methods
| Method | Summary |
|---|---|
Task<Matrix<T>> EmbedBatchAsync(IEnumerable<string> texts) |
Asynchronously generates embeddings for the specified texts using HuggingFace Inference API. |
Task<Vector<T>> EmbedAsync(string text) |
Asynchronously generates an embedding for the specified text using HuggingFace Inference API. |