DawnR0270 commited on
Commit
8b40986
·
verified ·
1 Parent(s): 5905c6d

Added get_historical_price_tool to agent tools

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,12 +1,12 @@
1
- from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
2
  import datetime
3
  import requests
4
  import pytz
5
  import yaml
6
  import yfinance as yf
7
  from tools.final_answer import FinalAnswerTool
8
-
9
  from Gradio_UI import GradioUI
 
10
  web_search_tool = DuckDuckGoSearchTool() #DuckDuckGoSearchTool() (With parentheses) makes
11
  #tool a ready-to-use object (i.e., callable instance)
12
 
@@ -173,7 +173,7 @@ with open("prompts.yaml", 'r') as stream:
173
 
174
  agent = CodeAgent(
175
  model=model,
176
- tools=[final_answer, get_current_time_in_timezone, get_current_time_in_timezone_non_IANA, get_stock_price_tool, web_search_tool],
177
  ## add your tools here (don't remove final answer). web_search_tool is a variable for DuckDuckGoSearchTool() instance.
178
  max_steps=6,
179
  verbosity_level=1,
 
1
+ from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel, load_tool,tool
2
  import datetime
3
  import requests
4
  import pytz
5
  import yaml
6
  import yfinance as yf
7
  from tools.final_answer import FinalAnswerTool
 
8
  from Gradio_UI import GradioUI
9
+
10
  web_search_tool = DuckDuckGoSearchTool() #DuckDuckGoSearchTool() (With parentheses) makes
11
  #tool a ready-to-use object (i.e., callable instance)
12
 
 
173
 
174
  agent = CodeAgent(
175
  model=model,
176
+ tools=[final_answer, get_current_time_in_timezone, get_current_time_in_timezone_non_IANA, get_stock_price_tool, get_historical_price_tool, web_search_tool],
177
  ## add your tools here (don't remove final answer). web_search_tool is a variable for DuckDuckGoSearchTool() instance.
178
  max_steps=6,
179
  verbosity_level=1,