Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix law_chat_bot #194

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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