gnyasue commited on
Commit
7506013
·
verified ·
1 Parent(s): 00e2a8b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -62,18 +62,18 @@ def get_boardgame_from_bgg(name: str) -> str:
62
  "bgg_url": f"https://boardgamegeek.com/boardgame/{game_id}"
63
  })
64
 
65
- @tool
66
  def search_boargame_price(name: str) -> str:
67
 
68
  """A tool to search for a boadgame price using duckduckgo search tool.
69
-
70
  Args:
71
  name: the name of the boargame you want to search for
72
 
73
  Returns:
74
  search results for game and price
75
  """
76
- try:
77
  agent = CodeAgent(
78
  tools[DuckDuckGoSearchTool()],
79
  model = model
@@ -82,7 +82,7 @@ def search_boargame_price(name: str) -> str:
82
  return agent.run(search_string)
83
  except Exception as e:
84
  return "price not found, use usd 150"
85
-
86
  @tool
87
  def get_current_time_in_timezone(timezone: str) -> str:
88
  """A tool that fetches the current local time in a specified timezone.
@@ -118,7 +118,7 @@ with open("prompts.yaml", 'r') as stream:
118
 
119
  agent = CodeAgent(
120
  model=model,
121
- tools=[get_boardgame_from_bgg, search_boargame_price, image_generation_tool, final_answer], ## add your tools here (don't remove final answer)
122
  max_steps=6,
123
  verbosity_level=1,
124
  grammar=None,
 
62
  "bgg_url": f"https://boardgamegeek.com/boardgame/{game_id}"
63
  })
64
 
65
+ """@tool
66
  def search_boargame_price(name: str) -> str:
67
 
68
  """A tool to search for a boadgame price using duckduckgo search tool.
69
+ """
70
  Args:
71
  name: the name of the boargame you want to search for
72
 
73
  Returns:
74
  search results for game and price
75
  """
76
+ """ try:
77
  agent = CodeAgent(
78
  tools[DuckDuckGoSearchTool()],
79
  model = model
 
82
  return agent.run(search_string)
83
  except Exception as e:
84
  return "price not found, use usd 150"
85
+ """
86
  @tool
87
  def get_current_time_in_timezone(timezone: str) -> str:
88
  """A tool that fetches the current local time in a specified timezone.
 
118
 
119
  agent = CodeAgent(
120
  model=model,
121
+ tools=[get_boardgame_from_bgg, DuckDuckGoSearchTool() , image_generation_tool, final_answer], ## add your tools here (don't remove final answer)
122
  max_steps=6,
123
  verbosity_level=1,
124
  grammar=None,