Jobfromearth commited on
Commit
bdd55fb
·
verified ·
1 Parent(s): da5db85

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -64,6 +64,15 @@ final_answer = FinalAnswerTool()
64
  # 实例化 DuckDuckGo 搜索工具
65
  search_tool = DuckDuckGoSearchTool()
66
 
 
 
 
 
 
 
 
 
 
67
  # If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
68
  # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
69
 
@@ -83,7 +92,7 @@ with open("prompts.yaml", 'r') as stream:
83
 
84
  agent = CodeAgent(
85
  model=model,
86
- tools=[final_answer, search_tool, image_generation_tool, get_hacker_news_top_stories, get_current_time_in_timezone, my_custom_tool], ## add your tools here (don't remove final answer)
87
  max_steps=6,
88
  verbosity_level=1,
89
  grammar=None,
 
64
  # 实例化 DuckDuckGo 搜索工具
65
  search_tool = DuckDuckGoSearchTool()
66
 
67
+ # 实例化 Hacker news top stories 工具
68
+ hacker_news = get_hacker_news_top_stories
69
+
70
+ # 实例化时间工具
71
+ get_time = get_current_time_in_timezone
72
+
73
+ # 实例化 定制工具
74
+ custom = my_custom_tool
75
+
76
  # If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
77
  # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
78
 
 
92
 
93
  agent = CodeAgent(
94
  model=model,
95
+ tools=[final_answer, search_tool, image_generation_tool, hacker_news, hacker_news, custom], ## add your tools here (don't remove final answer)
96
  max_steps=6,
97
  verbosity_level=1,
98
  grammar=None,