Spaces:
Sleeping
Sleeping
Sagar S
commited on
add search tool
Browse files
app.py
CHANGED
|
@@ -81,13 +81,14 @@ custom_role_conversions=None,
|
|
| 81 |
|
| 82 |
# Import tool from Hub
|
| 83 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
|
|
|
| 84 |
|
| 85 |
with open("prompts.yaml", 'r') as stream:
|
| 86 |
prompt_templates = yaml.safe_load(stream)
|
| 87 |
|
| 88 |
agent = CodeAgent(
|
| 89 |
model=model,
|
| 90 |
-
tools=[final_answer, image_generation_tool, get_current_time_in_timezone, get_country_data_by_country_name], ## add your tools here (don't remove final answer)
|
| 91 |
max_steps=6,
|
| 92 |
verbosity_level=1,
|
| 93 |
grammar=None,
|
|
|
|
| 81 |
|
| 82 |
# Import tool from Hub
|
| 83 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 84 |
+
search_tool = DuckDuckGoSearchTool()
|
| 85 |
|
| 86 |
with open("prompts.yaml", 'r') as stream:
|
| 87 |
prompt_templates = yaml.safe_load(stream)
|
| 88 |
|
| 89 |
agent = CodeAgent(
|
| 90 |
model=model,
|
| 91 |
+
tools=[final_answer, image_generation_tool, search_tool, get_current_time_in_timezone, get_country_data_by_country_name], ## add your tools here (don't remove final answer)
|
| 92 |
max_steps=6,
|
| 93 |
verbosity_level=1,
|
| 94 |
grammar=None,
|