TheRealNeil commited on
Commit
b0b108b
·
verified ·
1 Parent(s): 5439406

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -16,6 +16,7 @@ def get_stock_price(company:str)-> str: #it's import to specify the return type
16
  arg1: the ticker of the requested stock price
17
  """
18
  try:
 
19
  return f"The current price for '{company}' is '{price}'"
20
  except Exception as e:
21
  return f"Error fetching the stock price for '{company}': {str(e)}"
@@ -57,7 +58,7 @@ with open("prompts.yaml", 'r') as stream:
57
 
58
  agent = CodeAgent(
59
  model=model,
60
- tools=[final_answer], ## add your tools here (don't remove final answer)
61
  max_steps=6,
62
  verbosity_level=1,
63
  grammar=None,
 
16
  arg1: the ticker of the requested stock price
17
  """
18
  try:
19
+ price = DuckDuckGoSearchTool("'{company}' stock price")
20
  return f"The current price for '{company}' is '{price}'"
21
  except Exception as e:
22
  return f"Error fetching the stock price for '{company}': {str(e)}"
 
58
 
59
  agent = CodeAgent(
60
  model=model,
61
+ tools=[final_answer,DuckDuckGoSearchTool()], ## add your tools here (don't remove final answer)
62
  max_steps=6,
63
  verbosity_level=1,
64
  grammar=None,