Skip to content

Commit

Permalink
fix: Capture AI output in verification error messages for better debu…
Browse files Browse the repository at this point in the history
…gging
  • Loading branch information
onuratakan committed Dec 25, 2024
1 parent 0d25c10 commit c3137d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gpt_computer_assistant/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def run(self):
self.output = "User is not satisfied with the result. Please try again."
self.client.change_profile(self.hash)
result = self.client.request(self.description, self.output, screen=self.screen_task)

ai_result = result
try:
self.client.change_profile(self.hash+"VERIFY")
result = self.verifier.verify(self.description, result)
Expand All @@ -241,7 +241,7 @@ def run(self):
traceback.print_exc()
console.print(
Panel(
f"[red]Verification failed[/red]\nReason: {e}",
f"[red]Verification failed[/red]\nReason: {e}\nAI Output: {ai_result}",
title="Verification Error",
style=Style(color="bright_white", bgcolor="black", bold=True)
)
Expand Down

0 comments on commit c3137d7

Please sign in to comment.