Skip to content

Commit

Permalink
fix law_chat_bot
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamx123 committed Nov 18, 2024
1 parent afca9df commit 3c29253
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion agentuniverse/agent/action/knowledge/store/chroma_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ def query(self, query: Query, **kwargs) -> List[Document]:
Returns:
List[Document]: List of documents retrieved by the query.
"""

if self.collection is None:
self._new_client()
embedding = query.embeddings
if self.embedding_model is not None and len(embedding) == 0:
embedding = EmbeddingManager().get_instance_obj(
Expand Down
2 changes: 2 additions & 0 deletions agentuniverse/agent/action/knowledge/store/sqlite_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ def query(self, query: Query, **kwargs) -> List[Document]:
# Get doc_id from inverted index.
relevant_docs = set()
inverted_index = {}
if not self.conn:
self._new_client()
with self.conn:
for keyword in query_terms:
cursor = self.conn.cursor()
Expand Down
4 changes: 2 additions & 2 deletions sample_standard_app/app/core/rag_router/nlu_rag_router.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: 'nlu_rag_router'
description: 'base rag router map query to all store'
store_amount: 2
llm:
name: demo_llm
model_name: gpt-4o
name: 'qwen_llm'
model_name: 'qwen-max'
metadata:
type: 'RAG_ROUTER'
module: 'agentuniverse.agent.action.knowledge.rag_router.nlu_rag_router'
Expand Down

0 comments on commit 3c29253

Please sign in to comment.