Skip to content

Commit

Permalink
fix qdrant
Browse files Browse the repository at this point in the history
  • Loading branch information
vemonet committed Jan 10, 2024
1 parent 172c898 commit 4ce33cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/chat-vectorstore-qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ llm:
Helpful answer:
vector:
vector_path: "http://qdrant:6333"
vector_path: "qdrant"
# vector_path: ./vectorstore/qdrant # Path to the vectorstore to do QA retrieval
vector_download: null
embeddings_path: ./embeddings/all-MiniLM-L6-v2 # Embeddings used to generate the vectors. To use from HF: sentence-transformers/all-MiniLM-L6-v2
Expand Down
6 changes: 3 additions & 3 deletions src/libre_chat/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def setup_dbqa(self) -> None:
# FAISS should automatically use GPU?
# vectorstore = FAISS.load_local(self.get_vectorstore(), embeddings)
vectorstore = Qdrant(
QdrantClient(url=self.conf.vector.vector_path),
QdrantClient(host=self.conf.vector.vector_path, prefer_grpc=True),
collection_name="libre_chat_rag",
embeddings=embeddings,
)
Expand Down Expand Up @@ -231,9 +231,9 @@ def build_vectorstore(self, documents_path: Optional[str] = None) -> Optional[Qd
splitted_texts,
embeddings,
# path=self.conf.vector.vector_path,
url=self.conf.vector.vector_path,
host=self.conf.vector.vector_path,
collection_name="libre_chat_rag",
# prefer_grpc=True,
prefer_grpc=True,
# force_recreate=True,
)
# vectorstore = FAISS.from_documents(splitted_texts, embeddings)
Expand Down

0 comments on commit 4ce33cd

Please sign in to comment.