Config
What is Config?
Config in mem0 is a dictionary that specifies the settings for your vector database. It allows you to customize the behavior and connection details of your chosen vector store.
How to Define Config
The config is defined as a Python dictionary with two main keys:
vector_store
: Specifies the vector database provider and its configurationprovider
: The name of the vector database (e.g., “chroma”, “pgvector”, “qdrant”, “milvus”,“azure_ai_search”)config
: A nested dictionary containing provider-specific settings
How to Use Config
Here’s a general example of how to use the config with mem0:
Why is Config Needed?
Config is essential for:
- Specifying which vector database to use.
- Providing necessary connection details (e.g., host, port, credentials).
- Customizing database-specific settings (e.g., collection name, path).
- Ensuring proper initialization and connection to your chosen vector store.
Master List of All Params in Config
Here’s a comprehensive list of all parameters that can be used across different vector databases:
Parameter | Description |
---|---|
collection_name | Name of the collection |
embedding_model_dims | Dimensions of the embedding model |
client | Custom client for the database |
path | Path for the database |
host | Host where the server is running |
port | Port where the server is running |
user | Username for database connection |
password | Password for database connection |
dbname | Name of the database |
url | Full URL for the server |
api_key | API key for the server |
on_disk | Enable persistent storage |
Customizing Config
Each vector database has its own specific configuration requirements. To customize the config for your chosen vector store:
- Identify the vector database you want to use from supported vector databases.
- Refer to the
Config
section in the respective vector database’s documentation. - Include only the relevant parameters for your chosen database in the
config
dictionary.
Supported Vector Databases
For detailed information on configuring specific vector databases, please visit the Supported Vector Databases section. There you’ll find individual pages for each supported vector store with provider-specific usage examples and configuration details.