Skip to content

Commit

Permalink
fix vectorstore qdrant
Browse files Browse the repository at this point in the history
  • Loading branch information
vemonet committed Jan 10, 2024
1 parent ee3f104 commit 3ad883d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 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: "http://qdrant:6334"
# 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
12 changes: 6 additions & 6 deletions src/libre_chat/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ def __init__(
)

self.download_data()
if self.vector_path and not self.has_vectorstore():
if self.vector_path:
self.build_vectorstore()
else:
log.info(
f"♻️ Reusing existing vectorstore at {BOLD}{self.vector_path}{END}, skip building the vectorstore"
)
# if self.vector_path and not self.has_vectorstore():
# self.build_vectorstore()
# else:
# log.info(f"♻️ Reusing existing vectorstore at {BOLD}{self.vector_path}{END}, skip building the vectorstore")

log.info(f"🤖 Loading model from {BOLD}{self.model_path}{END}")
self.llm = self.get_llm()
Expand Down Expand Up @@ -232,7 +232,7 @@ def build_vectorstore(self, documents_path: Optional[str] = None) -> Optional[Qd
embeddings,
# path=self.conf.vector.vector_path,
url=self.conf.vector.vector_path,
# prefer_grpc=True,
prefer_grpc=True,
collection_name="libre_chat_rag",
force_recreate=True,
)
Expand Down

0 comments on commit 3ad883d

Please sign in to comment.