Update cool_agent.py
Browse files- cool_agent.py +5 -4
cool_agent.py
CHANGED
|
@@ -21,6 +21,7 @@ from smolagents import (
|
|
| 21 |
import threading
|
| 22 |
|
| 23 |
|
|
|
|
| 24 |
AUTHORIZED_IMPORTS = [
|
| 25 |
"requests",
|
| 26 |
"zipfile",
|
|
@@ -93,11 +94,11 @@ def create_agent(model_id="gpt-4o-mini"):
|
|
| 93 |
# ArchiveSearchTool(browser),
|
| 94 |
TextInspectorTool(model, text_limit),
|
| 95 |
]
|
| 96 |
-
|
| 97 |
model=model,
|
| 98 |
tools=WEB_TOOLS,
|
| 99 |
max_steps=2,#20,
|
| 100 |
-
verbosity_level=1,
|
| 101 |
planning_interval=4,
|
| 102 |
name="search_agent",
|
| 103 |
description="""A team member that will search the internet to answer your question.
|
|
@@ -115,7 +116,7 @@ def create_agent(model_id="gpt-4o-mini"):
|
|
| 115 |
""",
|
| 116 |
provide_run_summary=True,
|
| 117 |
)
|
| 118 |
-
|
| 119 |
.txt online files.
|
| 120 |
If a non-html page is in another format, especially .pdf or a Youtube video, use tool
|
| 121 |
'inspect_file_as_text' to inspect it.
|
|
@@ -130,7 +131,7 @@ def create_agent(model_id="gpt-4o-mini"):
|
|
| 130 |
verbosity_level=2,
|
| 131 |
additional_authorized_imports=AUTHORIZED_IMPORTS,
|
| 132 |
planning_interval=4,
|
| 133 |
-
managed_agents=[
|
| 134 |
)
|
| 135 |
|
| 136 |
return manager_agent
|
|
|
|
| 21 |
import threading
|
| 22 |
|
| 23 |
|
| 24 |
+
|
| 25 |
AUTHORIZED_IMPORTS = [
|
| 26 |
"requests",
|
| 27 |
"zipfile",
|
|
|
|
| 94 |
# ArchiveSearchTool(browser),
|
| 95 |
TextInspectorTool(model, text_limit),
|
| 96 |
]
|
| 97 |
+
search_agent = ToolCallingAgent(
|
| 98 |
model=model,
|
| 99 |
tools=WEB_TOOLS,
|
| 100 |
max_steps=2,#20,
|
| 101 |
+
verbosity_level=1,#2,
|
| 102 |
planning_interval=4,
|
| 103 |
name="search_agent",
|
| 104 |
description="""A team member that will search the internet to answer your question.
|
|
|
|
| 116 |
""",
|
| 117 |
provide_run_summary=True,
|
| 118 |
)
|
| 119 |
+
search_agent.prompt_templates["managed_agent"]["task"] += """You can navigate to
|
| 120 |
.txt online files.
|
| 121 |
If a non-html page is in another format, especially .pdf or a Youtube video, use tool
|
| 122 |
'inspect_file_as_text' to inspect it.
|
|
|
|
| 131 |
verbosity_level=2,
|
| 132 |
additional_authorized_imports=AUTHORIZED_IMPORTS,
|
| 133 |
planning_interval=4,
|
| 134 |
+
managed_agents=[search_agent],
|
| 135 |
)
|
| 136 |
|
| 137 |
return manager_agent
|