--- title: 🗄️ Vector databases --- ## Overview Utilizing a vector database alongside Embedchain is a seamless process. All you need to do is configure it within the YAML configuration file. We've provided examples for each supported database below: ## ChromaDB ```python main.py from embedchain import Pipeline as App # load chroma configuration from yaml file app = App.from_config(yaml_path="config1.yaml") ``` ```yaml config1.yaml vectordb: provider: chroma config: collection_name: 'my-collection' dir: db allow_reset: true ``` ```yaml config2.yaml vectordb: provider: chroma config: collection_name: 'my-collection' host: localhost port: 5200 allow_reset: true ``` ## Elasticsearch Install related dependencies using the following command: ```bash pip install --upgrade 'embedchain[elasticsearch]' ``` ```python main.py from embedchain import Pipeline as App # load elasticsearch configuration from yaml file app = App.from_config(yaml_path="config.yaml") ``` ```yaml config.yaml vectordb: provider: elasticsearch config: collection_name: 'es-index' es_url: http://localhost:9200 allow_reset: true api_key: xxx ``` ## OpenSearch Install related dependencies using the following command: ```bash pip install --upgrade 'embedchain[opensearch]' ``` ```python main.py from embedchain import Pipeline as App # load opensearch configuration from yaml file app = App.from_config(yaml_path="config.yaml") ``` ```yaml config.yaml vectordb: provider: opensearch config: opensearch_url: 'https://localhost:9200' http_auth: - admin - admin vector_dimension: 1536 collection_name: 'my-app' use_ssl: false verify_certs: false ``` ## Zilliz Install related dependencies using the following command: ```bash pip install --upgrade 'embedchain[milvus]' ``` Set the Zilliz environment variables `ZILLIZ_CLOUD_URI` and `ZILLIZ_CLOUD_TOKEN` which you can find it on their [cloud platform](https://cloud.zilliz.com/). ```python main.py import os from embedchain import Pipeline as App os.environ['ZILLIZ_CLOUD_URI'] = 'https://xxx.zillizcloud.com' os.environ['ZILLIZ_CLOUD_TOKEN'] = 'xxx' # load zilliz configuration from yaml file app = App.from_config(yaml_path="config.yaml") ``` ```yaml config.yaml vectordb: provider: zilliz config: collection_name: 'zilliz-app' uri: https://xxxx.api.gcp-region.zillizcloud.com token: xxx vector_dim: 1536 metric_type: L2 ``` ## LanceDB _Coming soon_ ## Pinecone Install pinecone related dependencies using the following command: ```bash pip install --upgrade 'embedchain[pinecone]' ``` In order to use Pinecone as vector database, set the environment variables `PINECONE_API_KEY` and `PINECONE_ENV` which you can find on [Pinecone dashboard](https://app.pinecone.io/). ```python main.py from embedchain import Pipeline as App # load pinecone configuration from yaml file app = App.from_config(yaml_path="config.yaml") ``` ```yaml config.yaml vectordb: provider: pinecone config: metric: cosine vector_dimension: 1536 collection_name: my-pinecone-index ``` ## Qdrant In order to use Qdrant as a vector database, set the environment variables `QDRANT_URL` and `QDRANT_API_KEY` which you can find on [Qdrant Dashboard](https://cloud.qdrant.io/). ```python main.py from embedchain import Pipeline as App # load qdrant configuration from yaml file app = App.from_config(yaml_path="config.yaml") ``` ```yaml config.yaml vectordb: provider: qdrant config: collection_name: my_qdrant_index ``` ## Weaviate In order to use Weaviate as a vector database, set the environment variables `WEAVIATE_ENDPOINT` and `WEAVIATE_API_KEY` which you can find on [Weaviate dashboard](https://console.weaviate.cloud/dashboard). ```python main.py from embedchain import Pipeline as App # load weaviate configuration from yaml file app = App.from_config(yaml_path="config.yaml") ``` ```yaml config.yaml vectordb: provider: weaviate config: collection_name: my_weaviate_index ```