Skip to content

Commit

Permalink
context-creation-without-knowledge-base-phi-2019
Browse files Browse the repository at this point in the history
  • Loading branch information
ysolanky committed Nov 19, 2024
1 parent aa4ecaf commit 0190706
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion phi/agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ def get_user_message(

# Get references from the knowledge base related to the user message
context = None
if self.add_context and message and isinstance(message, str):
if self.add_context and message and isinstance(message, str) and self.knowledge:
retrieval_timer = Timer()
retrieval_timer.start()
docs_from_knowledge = self.get_relevant_docs_from_knowledge(query=message, **kwargs)
Expand Down

0 comments on commit 0190706

Please sign in to comment.