Back to Chatgpt Retrieval Plugin

Qdrant

docs/providers/qdrant/setup.md

latest2.6 KB
Original Source

Qdrant

Qdrant is a vector database that can store documents and vector embeddings. It can run as a self-hosted version or a managed Qdrant Cloud solution. The configuration is almost identical for both options, except for the API key that Qdrant Cloud provides.

Environment Variables:

NameRequiredDescriptionDefault
DATASTOREYesDatastore name, set to qdrant
BEARER_TOKENYesSecret token
OPENAI_API_KEYYesOpenAI API key
QDRANT_URLYesQdrant instance URLhttp://localhost
QDRANT_PORTOptionalTCP port for Qdrant HTTP communication6333
QDRANT_GRPC_PORTOptionalTCP port for Qdrant GRPC communication6334
QDRANT_API_KEYOptionalQdrant API key for Qdrant Cloud
QDRANT_COLLECTIONOptionalQdrant collection namedocument_chunks

Qdrant Cloud

For a hosted Qdrant Cloud version, provide the Qdrant instance URL and the API key from the Qdrant Cloud UI.

Example:

bash
QDRANT_URL="https://YOUR-CLUSTER-URL.aws.cloud.qdrant.io"
QDRANT_API_KEY="<YOUR_QDRANT_CLOUD_CLUSTER_API_KEY>"

The other parameters are optional and can be changed if needed.

Self-hosted Qdrant Instance

For a self-hosted version, use Docker containers or the official Helm chart for deployment. The only required parameter is the QDRANT_URL that points to the Qdrant server URL.

Example:

bash
QDRANT_URL="http://YOUR_HOST.example.com:6333"

The other parameters are optional and can be changed if needed.

Running Qdrant Integration Tests

A suite of integration tests verifies the Qdrant integration. To run it, start a local Qdrant instance in a Docker container.

bash
docker run -p "6333:6333" -p "6334:6334" qdrant/qdrant:v1.0.3

Then, launch the test suite with this command:

bash
pytest ./tests/datastore/providers/qdrant/test_qdrant_datastore.py