Spaces:
Configuration error
Configuration error
Download src/rag_chatbot/shared/qdrant.py from nhabibi/HF-RAGChatbot-Streamlit: direct link, hf CLI and curl.
- Browser
- Download file 566 Bytes
-
https://huggingface.co/spaces/nhabibi/HF-RAGChatbot-Streamlit/resolve/main/src/rag_chatbot/shared/qdrant.py
- Command line
-
hf download hf://spaces/nhabibi/HF-RAGChatbot-Streamlit/src/rag_chatbot/shared/qdrant.py
-
curl -L -o qdrant.py https://huggingface.co/spaces/nhabibi/HF-RAGChatbot-Streamlit/resolve/main/src/rag_chatbot/shared/qdrant.py
566 Bytes
| """One Qdrant client for indexing and retrieval: local (default) or Qdrant Cloud.""" | |
| from qdrant_client import QdrantClient | |
| from rag_chatbot.shared.settings import secret, settings | |
| def qdrant_client() -> QdrantClient: | |
| """The local Qdrant of docker-compose, or Qdrant Cloud when | |
| `[qdrant] use_cloud = true` (URL in `cloud_url`, key in `[secrets] QDRANT_API_KEY`).""" | |
| if settings.qdrant.use_cloud: | |
| return QdrantClient(url=settings.qdrant.cloud_url, api_key=secret("QDRANT_API_KEY"), timeout=60) | |
| return QdrantClient(url=settings.qdrant.url) | |