Baseer1432 commited on
Commit
29dbcc8
·
verified ·
1 Parent(s): 020557c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -18,7 +18,8 @@ def my_custom_tool(arg1:int, arg2:int)-> int: #it's import to specify the return
18
  """
19
 
20
  return arg1*arg2
21
-
 
22
  @tool
23
  def get_current_time_in_timezone(timezone: str) -> str:
24
  """A tool that fetches the current local time in a specified timezone.
@@ -56,7 +57,7 @@ with open("prompts.yaml", 'r') as stream:
56
 
57
  agent = CodeAgent(
58
  model=model,
59
- tools=[final_answer,my_custom_tool], ## add your tools here (don't remove final answer)
60
  max_steps=6,
61
  verbosity_level=1,
62
  grammar=None,
 
18
  """
19
 
20
  return arg1*arg2
21
+ except Exception as ee:
22
+ return f"Error fetching result {str(ee)}"
23
  @tool
24
  def get_current_time_in_timezone(timezone: str) -> str:
25
  """A tool that fetches the current local time in a specified timezone.
 
57
 
58
  agent = CodeAgent(
59
  model=model,
60
+ tools=[final_answer,my_custom_tool], ## add your tools here (don't remove final answer)
61
  max_steps=6,
62
  verbosity_level=1,
63
  grammar=None,