Skip to content

Commit

Permalink
Log errors in events for Hal9 app (#451)
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisGuillen03 authored Nov 19, 2024
1 parent f92e238 commit fafa77e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/hal9/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ def run(messages, tools):
]

tools = h9.describe(all_tools, model = "llama")
completion = run(messages, tools)

try:
completion = run(messages, tools)
h9.complete(completion, messages = messages, tools = all_tools, show = False, model = "llama")
except Exception as e:
h9.event('error', e)
one_tool = h9.describe([generic_reply], model = "llama")
completion = run(messages, one_tool)
h9.complete(completion, messages = messages, tools = [generic_reply], show = False, model = "llama")
Expand Down

0 comments on commit fafa77e

Please sign in to comment.