jacobolopez commited on
Commit
b44f044
·
verified ·
1 Parent(s): 66d459b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -34,13 +34,16 @@ def get_current_time_in_timezone(timezone: str) -> str:
34
  except Exception as e:
35
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
36
 
 
37
  @tool
38
- def get_restaurant_suggestion(food_type: str) -> str:
39
- """A tool that suggests a random restaurant suggestion
 
40
  Args:
41
- food_type: A string representing a valid food type e.g., 'italian'
 
42
  """
43
- return "Mario y Luigi"
44
 
45
 
46
  final_answer = FinalAnswerTool()
@@ -64,7 +67,7 @@ with open("prompts.yaml", 'r') as stream:
64
 
65
  agent = CodeAgent(
66
  model=model,
67
- tools=[final_answer, get_restaurant_suggestion], ## add your tools here (don't remove final answer)
68
  max_steps=6,
69
  verbosity_level=1,
70
  grammar=None,
 
34
  except Exception as e:
35
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
36
 
37
+ # Below is an example of a tool that does nothing. Amaze us with your creativity !
38
  @tool
39
+ def my_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
40
+ #Keep this format for the description / args / args description but feel free to modify the tool
41
+ """A tool that does nothing yet
42
  Args:
43
+ arg1: the first argument
44
+ arg2: the second argument
45
  """
46
+ return "What magic will you build ?"
47
 
48
 
49
  final_answer = FinalAnswerTool()
 
67
 
68
  agent = CodeAgent(
69
  model=model,
70
+ tools=[final_answer, my_tool], ## add your tools here (don't remove final answer)
71
  max_steps=6,
72
  verbosity_level=1,
73
  grammar=None,