Skip to content

Commit

Permalink
fix: passing empty chat history
Browse files Browse the repository at this point in the history
  • Loading branch information
aaa006bd committed Sep 18, 2023
1 parent 229f451 commit c0d1340
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ai/question.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def ask(repo_id: int, chat_id: str, question: str):
return_source_documents=True,
)

result = agent({'question': question, 'chat_history':[]})
result = agent({'question': question})
print(f"Answer: {result['answer']}")
print(f"Sources: {[x.metadata['source'] for x in result['source_documents']]}")

Expand Down

0 comments on commit c0d1340

Please sign in to comment.