Fix the usage of duckduckgo tool
Browse files
app.py
CHANGED
@@ -63,13 +63,14 @@ custom_role_conversions=None,
|
|
63 |
|
64 |
# Import tool from Hub
|
65 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
|
|
66 |
|
67 |
with open("prompts.yaml", 'r') as stream:
|
68 |
prompt_templates = yaml.safe_load(stream)
|
69 |
|
70 |
agent = CodeAgent(
|
71 |
model=model,
|
72 |
-
tools=[get_current_time_in_timezone, get_person_bio,
|
73 |
max_steps=6,
|
74 |
verbosity_level=1,
|
75 |
grammar=None,
|
|
|
63 |
|
64 |
# Import tool from Hub
|
65 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
66 |
+
search_tool = DuckDuckGoSearchTool()
|
67 |
|
68 |
with open("prompts.yaml", 'r') as stream:
|
69 |
prompt_templates = yaml.safe_load(stream)
|
70 |
|
71 |
agent = CodeAgent(
|
72 |
model=model,
|
73 |
+
tools=[get_current_time_in_timezone, get_person_bio, search_tool, final_answer], ## add your tools here (don't remove final answer)
|
74 |
max_steps=6,
|
75 |
verbosity_level=1,
|
76 |
grammar=None,
|