rsynak commited on
Commit
c7a38bf
·
verified ·
1 Parent(s): 97a0b05

update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -9,14 +9,14 @@ from Gradio_UI import GradioUI
9
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
  @tool
12
- def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
13
  #Keep this format for the description / args / args description but feel free to modify the tool
14
- """A tool that does nothing yet
15
  Args:
16
- arg1: STATE_CAPITAL
17
- arg2: ALTTITUDE
18
  """
19
- return "What magic will you build ?"
20
 
21
 
22
 
@@ -57,7 +57,7 @@ with open("prompts.yaml", 'r') as stream:
57
 
58
  agent = CodeAgent(
59
  model=model,
60
- tools=[final_answer, get_current_time_in_timezone, duckduckgo_tool], ## add your tools here (don't remove final answer)
61
  max_steps=6,
62
  verbosity_level=1,
63
  grammar=None,
 
9
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
  @tool
12
+ def my_custom_tool(state:str, altitude:int)-> str: #it's import to specify the return type
13
  #Keep this format for the description / args / args description but feel free to modify the tool
14
+ """A tool that fetchs the state capital and its altitude
15
  Args:
16
+ state: A string representing the state who's capital we need to identify
17
+ altitude: The altitude of the state capital we've identified
18
  """
19
+ return "The altitude of '{state}'s capital is '{altitude}'"
20
 
21
 
22
 
 
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,