CohereEmbeddingModel<T>
Models & Types ยท AiDotNet.RetrievalAugmentedGeneration.EmbeddingModels
Cohere embedding model integration for high-performance embeddings.
Inheritance: EmbeddingModelBase<T> โ CohereEmbeddingModel<T>
How It Works
Cohere provides state-of-the-art embeddings with multiple model sizes optimized for different use cases (English, multilingual, search, classification).
Constructors
| Constructor | Summary |
|---|---|
CohereEmbeddingModel(string apiKey, string model, string inputType, int dimension, 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 a batch of texts using Cohere API. |
Task<Vector<T>> EmbedAsync(string text) |
Asynchronously generates an embedding for a single text using the Cohere API. |