nlweb-qdrant-vectordb
Qdrant provider for NLWeb.
Overview
This package provides Qdrant vector database support for NLWeb, demonstrating how to create third-party provider packages.
Installation
pip install nlweb-core nlweb-qdrant-vectordb
For LLM and embedding, you'll also need a model provider:
pip install nlweb-azure-models
Or use the bundle packages:
pip install nlweb-core nlweb-retrieval nlweb-models
Configuration
Create config.yaml:
retrieval:
provider: qdrant
import_path: nlweb_qdrant_vectordb.qdrant_client
class_name: QdrantClient
api_endpoint_env: QDRANT_URL # Optional for remote Qdrant
api_key_env: QDRANT_API_KEY # Optional for remote Qdrant
database_path_env: QDRANT_PATH # Optional for local Qdrant
index_name: my-collection
Authentication
For remote Qdrant:
export QDRANT_URL=https://your-cluster.qdrant.tech
export QDRANT_API_KEY=your_api_key_here
For local Qdrant:
export QDRANT_PATH=./data/qdrant
Usage
import nlweb_core
# Initialize
nlweb_core.init(config_path="./config.yaml")
# Search
from nlweb_core import retriever
results = await retriever.search(
query="example query",
site="example.com",
num_results=10
)
Features
- Vector similarity search with Qdrant
- Support for both remote and local Qdrant instances
- HNSW-based efficient similarity search
- Configurable collection names
- API key authentication for remote instances
- Local file-based storage option
- Compatible with NLWeb Protocol v0.5
Creating Your Own Provider Package
Use this package as a template:
-
Create package structure:
nlweb-yourprovider/ ├── pyproject.toml ├── README.md └── nlweb_yourprovider/ ├── __init__.py └── your_client.py -
Implement VectorDBClientInterface:
from nlweb_core.retriever import VectorDBClientInterface class YourClient(VectorDBClientInterface): async def search(self, query, site, num_results, **kwargs): # Your implementation pass
-
Declare dependencies in
pyproject.toml:dependencies = [ "nlweb-core>=0.5.0", "your-provider-sdk>=1.0.0", ]
-
Publish to PyPI:
python -m build twine upload dist/*
License
MIT License - Copyright (c) 2025 Microsoft Corporation
Metadata
Release files for nlweb-qdrant-vectordb 0.5.42
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nlweb_qdrant_vectordb-0.5.42.tar.gz | 13.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nlweb_qdrant_vectordb-0.5.42-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.9 kB
Release files / nlweb_qdrant_vectordb-0.5.42.tar.gz
| Download URL | nlweb_qdrant_vectordb-0.5.42.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ed7c943344be60d065740ec49a7e9ac2d6d616971f3a144a547e2e7a4d64853
|
|
BLAKE2b-256 checksum How to use checksums |
1d884f1fc104d69a82678191a83522d17824deefd11830d76ca4e59504af0853
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|
Release files / nlweb_qdrant_vectordb-0.5.42-py3-none-any.whl
| Download URL | nlweb_qdrant_vectordb-0.5.42-py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
110d30dfae822b167e11f1a7d8d377f02869c65cd1cc94d9493c8bcd68101077
|
|
BLAKE2b-256 checksum How to use checksums |
68e8489d2596ce33bb26e3c0b2f7d80ba19f5589c98ad743f3b3070a3f17733a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|