Cohere

Parameter reference for CohereEmbedder: model ID, input type, embedding types, and batching options.

Cohere Embedder embeds documents using Cohere's embedding models.

dimensions is the vector width Agno expects. It is not sent to Cohere and does not change the model's output width. The default embed-english-v3.0 model returns 1024 dimensions, while CohereEmbedder inherits a default of 1536. Set dimensions=1024 when using the default model.

Parameters

ParameterTypeDescriptionDefault
idstrThe model ID to use for embeddings"embed-english-v3.0"
dimensionsOptional[int]Vector width expected by Agno and the vector database. This value is not sent to Cohere.1536
input_typestrType of input being embedded (e.g., "search_query", "classification", "clustering")"search_query"
embedding_typesOptional[List[str]]Cohere embedding response types. Include "float" when setting this option because Agno reads float embeddings.None
api_keyOptional[str]Cohere API key. When omitted, the Cohere client reads CO_API_KEY.None
request_paramsOptional[Dict[str, Any]]Additional parameters for embedding requestsNone
client_paramsOptional[Dict[str, Any]]Additional parameters for client initializationNone
cohere_clientOptional[CohereClient]Pre-configured Cohere clientNone
async_clientOptional[AsyncCohereClient]Pre-configured async Cohere clientNone
exponential_backoffboolRetry Cohere rate-limit responses during asynchronous batch embedding. This applies only to the async batch path.False
enable_batchboolEmbed multiple texts per API call when adding content to vector databasesFalse
batch_sizeintNumber of texts per batch when enable_batch is True100

Set embedding_types=["float"] when selecting Cohere response types. Agno reads response.embeddings.float_; configurations limited to int8, uint8, binary, or ubinary return an empty embedding.