Spaces:
Sleeping
Sleeping
Download agent/vector_store.py from bagustenan/backend: direct link, hf CLI and curl.
- Browser
- Download file 500 Bytes
-
https://huggingface.co/spaces/bagustenan/backend/resolve/main/agent/vector_store.py
- Command line
-
hf download hf://spaces/bagustenan/backend/agent/vector_store.py
-
curl -L -o vector_store.py https://huggingface.co/spaces/bagustenan/backend/resolve/main/agent/vector_store.py
500 Bytes
| import os | |
| from qdrant_client import QdrantClient | |
| def get_qdrant_client(): | |
| """ | |
| Returns a configured QdrantClient instance. | |
| """ | |
| qdrant_url = os.getenv("QDRANT_URL") | |
| qdrant_api_key = os.getenv("QDRANT_API_KEY") | |
| if not qdrant_url: | |
| raise ValueError("QDRANT_URL environment variable is not set") | |
| if not qdrant_api_key: | |
| raise ValueError("QDRANT_API_KEY environment variable is not set") | |
| return QdrantClient(url=qdrant_url, api_key=qdrant_api_key) | |