Skip to content

Commit

Permalink
hot fix for overly long histories
Browse files Browse the repository at this point in the history
  • Loading branch information
Pietro Martino Lugato committed Sep 30, 2024
1 parent c410a46 commit 3086579
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion A2rchi/interfaces/cleo.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,11 @@ def process_new_issues(self):
if record.notes != "":
history += f"\n next entry: {record.notes}"
print("History input: ",history)
answer = self.ai_wrapper(self.get_issue_history(issue.id))
try:
answer = self.ai_wrapper(self.get_issue_history(issue.id))
except Exception as e:
print(f"ERROR: {e}")
answer = "I am sorry, I am not able to process this request at the moment. Please continue with this ticket manually."
self.add_note_to_issue(issue.id,answer)
print("A2rchi's response:\n",answer)
self.feedback_issue(issue.id)
Expand Down

0 comments on commit 3086579

Please sign in to comment.