How to define configurations?
Thereranker
configuration is defined as an object with two main keys:
provider
: The name of the reranker provider (e.g., “cohere”, “sentence_transformer”, “huggingface”, “llm_reranker”)config
: A nested dictionary containing provider-specific settings
Basic Configuration
Here’s how to configure a reranker with Mem0:Configuration Parameters
Parameter | Description | Required | Default |
---|---|---|---|
provider | Reranker provider name | Yes | - |
config | Provider-specific configuration | Yes | - |
Common Config Parameters
Parameter | Description | Providers |
---|---|---|
api_key | API key for the service | Cohere, Hugging Face |
model | Model name to use | All |
top_n | Number of results to return | All |
device | Device to run on (cpu/cuda/mps) | Sentence Transformer, Hugging Face |