CohereDocumentEmbedder Parameters

Check the init and runtime parameters you can configure for CohereDocumentEmbedder.

YAML Init Parameters

These are the parameters you can specify in pipeline YAML:

ParameterTypePossible valuesDescription
api_keySecretDefault: {"type": "env_var", "env_vars": ["COHERE_API_KEY", "CO_API_KEY"], "strict": False}The Cohere API key.
Required.
modelStringembed-english-v3.0,
embed-english-light-v3.0,
embed-multilingual-v3.0,
embed-multilingual-light-v3.0,
embed-english-v2.0,
embed-english-light-v2.0,
embed-multilingual-v2.0
Default: embed-english-v2.0
The name of the model to use. For a list of supported models, see Cohere documentation.
Required.
input_typeStringsearch_document,
search_query,
classification,
clustering
Default: search_document
Specifies the type of input for the model. Optional for models lower than v3, required for v3 and higher.
api_base_urlStringDefault: https://api.cohere.comThe Cohere API base URL.
Required.
truncateStringNONE,
START,
END
Truncate embeddings that are too long from the start or the end.
Possible values:
START discards the start of the input until the remaining input is exactly the maximum input token length for the model.
END discards the end of the input until the remaining input is exactly the maximum input token length for the model.
NONEreturns an error if the input exceeds the maximum input token length.
Required.
use_async_clientBooleanTrue, False
Default: False
Flag to select the AsyncClient. Recommended for applications with many concurrent calls.
Required.
timeoutIntegerDefault: 120Request timeout in seconds. Required.
batch_sizeIntegerDefault: 32Number of documents to encode at once.
Required.
progress_barBooleanTrue, False
Default: True
Shows a progress bar. Can be helpful to disable in production deployments to keep the logs clean.
Required.
meta_fields_to_embedList of stringsDefault: NoneList of metadata fields that should be embedded along with the document text.
Optional.
embedding_separatorStringDefault: \nSeparator used to concatenate the meta fields to the Document text. Required.

REST API Runtime Parameters