Learn what parameters you can set for CohereRanker.
YAML Init Parameters
These are the parameters you can pass to this component in the pipeline YAML configuration:
Parameter | Type | Possible values | Description |
---|---|---|---|
model | String | Default: rerank-english-v2.0 | Cohere model name. Check the list of supported models in the Cohere documentation. Required. |
top_k | Integer | Default: 10 | The maximum number of documents to return. Required. |
api_key | Secret | Default: {"type": "env_var", "env_vars": ["COHERE_API_KEY", "CO_API_KEY"], "strict": False} | Cohere API key. Required. |
api_base_url | String | Default: https://api.cohere.com | The base URL of the Cohere API. Required. |
max_chunks_per_doc | Integer | Default: None | If your document exceeds 512 tokens, this determines the maximum number of chunks a document can be split into. If None , the default of 10 is used. Check Cohere docs for more information.Optional. |
meta_fields_to_embed | List of strings | Default: None | List of metadata fields to concatenate with the document content for reranking. Optional. |
meta_data_separator | String | Default: \n | Separator used to concatenate the meta fields to the document content. Required. |
REST API Runtime Parameters
There are no runtime parameters you can pass to this component when making a request to the Search REST API endpoint.