tedtang commited on
Commit
94488a1
·
verified ·
1 Parent(s): faa1634

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -7
app.py CHANGED
@@ -9,15 +9,13 @@ 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 list_config(arg1:str)-> str: #it's import to specify the return type
13
  #Keep this format for the description / args description but feel free to modify the tool
14
- """A tool that list program config
15
  Args:
16
- arg1: config path
17
  """
18
- with open("prompts.yaml", 'r') as stream:
19
- prompt_templates = yaml.safe_load(stream)
20
- return str(prompt_templates)
21
 
22
  @tool
23
  def get_current_time_in_timezone(timezone: str) -> str:
@@ -56,7 +54,7 @@ with open("prompts.yaml", 'r') as stream:
56
 
57
  agent = CodeAgent(
58
  model=model,
59
- tools=[final_answer, list_config, get_current_time_in_timezone], ## add your tools here (don't remove final answer)
60
  max_steps=6,
61
  verbosity_level=1,
62
  grammar=None,
 
9
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
  @tool
12
+ def say_hi_with_chinese(name:str)-> str: #it's import to specify the return type
13
  #Keep this format for the description / args description but feel free to modify the tool
14
+ """A tool that say hi with chinese
15
  Args:
16
+ name: username
17
  """
18
+ return f"你好,我是你的智能小助手ted,很高兴认识你,{name}"
 
 
19
 
20
  @tool
21
  def get_current_time_in_timezone(timezone: str) -> str:
 
54
 
55
  agent = CodeAgent(
56
  model=model,
57
+ tools=[final_answer, say_hi_with_chinese, get_current_time_in_timezone], ## add your tools here (don't remove final answer)
58
  max_steps=6,
59
  verbosity_level=1,
60
  grammar=None,