Skip to main content

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

Elasticsearch

OpenSearch

Zilliz

LanceDB

Pinecone

Qdrant

Weaviate

ChromaDB

from embedchain import App

# load chroma configuration from yaml file
app = App.from_config(config_path="config1.yaml")

Elasticsearch

Install related dependencies using the following command:
pip install --upgrade 'embedchain[elasticsearch]'
You can configure the Elasticsearch connection by providing either es_url or cloud_id. If you are using the Elasticsearch Service on Elastic Cloud, you can find the cloud_id on the Elastic Cloud dashboard.
You can authorize the connection to Elasticsearch by providing either basic_auth, api_key, or bearer_auth.
from embedchain import App

# load elasticsearch configuration from yaml file
app = App.from_config(config_path="config.yaml")

OpenSearch

Install related dependencies using the following command:
pip install --upgrade 'embedchain[opensearch]'
from embedchain import App

# load opensearch configuration from yaml file
app = App.from_config(config_path="config.yaml")

Zilliz

Install related dependencies using the following command:
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.
import os
from embedchain import 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(config_path="config.yaml")

LanceDB

Coming soon

Pinecone

Install pinecone related dependencies using the following command:
pip install --upgrade 'embedchain[pinecone]'
In order to use Pinecone as vector database, set the environment variable PINECONE_API_KEY which you can find on Pinecone dashboard.
from embedchain import App

# load pinecone configuration from yaml file
app = App.from_config(config_path="pod_config.yaml")
# or
app = App.from_config(config_path="serverless_config.yaml")

You can find more information about Pinecone configuration here. You can also optionally provide index_name as a config param in yaml file to specify the index name. If not provided, the index name will be {collection_name}-{vector_dimension}.

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.
from embedchain import App

# load qdrant configuration from yaml file
app = App.from_config(config_path="config.yaml")

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.
from embedchain import App

# load weaviate configuration from yaml file
app = App.from_config(config_path="config.yaml")
If you can't find the specific vector database, please feel free to request through one of the following channels and help us prioritize.

Slack

Let us know on our slack community

Discord

Let us know on discord community

GitHub

Open an issue on our GitHub

Schedule a call

Schedule a call with Embedchain founder