From fafa77e72d98032979999efa582e682d0305863f Mon Sep 17 00:00:00 2001 From: Luis Guillen <81443577+LuisGuillen03@users.noreply.github.com> Date: Tue, 19 Nov 2024 13:00:01 -0600 Subject: [PATCH] Log errors in events for Hal9 app (#451) --- apps/hal9/app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/hal9/app.py b/apps/hal9/app.py index 5b5803bc..28265a00 100644 --- a/apps/hal9/app.py +++ b/apps/hal9/app.py @@ -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")