Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Henri Bonamy commited on
Commit ·
68a4e49
1
Parent(s): e6cb515
Agent can now plan using a new tool
Browse files- agent/core/tools.py +8 -1
agent/core/tools.py
CHANGED
|
@@ -14,6 +14,7 @@ from mcp.types import EmbeddedResource, ImageContent, TextContent
|
|
| 14 |
|
| 15 |
from agent.config import MCPServerConfig
|
| 16 |
from agent.tools.jobs_tool import HF_JOBS_TOOL_SPEC, hf_jobs_handler
|
|
|
|
| 17 |
|
| 18 |
# Suppress aiohttp deprecation warning
|
| 19 |
warnings.filterwarnings(
|
|
@@ -186,7 +187,7 @@ class ToolRouter:
|
|
| 186 |
|
| 187 |
def create_builtin_tools() -> list[ToolSpec]:
|
| 188 |
"""Create built-in tool specifications"""
|
| 189 |
-
print(f"Creating built-in tools: {HF_JOBS_TOOL_SPEC['name']}")
|
| 190 |
return [
|
| 191 |
ToolSpec(
|
| 192 |
name=HF_JOBS_TOOL_SPEC["name"],
|
|
@@ -194,4 +195,10 @@ def create_builtin_tools() -> list[ToolSpec]:
|
|
| 194 |
parameters=HF_JOBS_TOOL_SPEC["parameters"],
|
| 195 |
handler=hf_jobs_handler,
|
| 196 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 197 |
]
|
|
|
|
| 14 |
|
| 15 |
from agent.config import MCPServerConfig
|
| 16 |
from agent.tools.jobs_tool import HF_JOBS_TOOL_SPEC, hf_jobs_handler
|
| 17 |
+
from agent.tools.plan_tool import PLAN_TOOL_SPEC, plan_tool_handler
|
| 18 |
|
| 19 |
# Suppress aiohttp deprecation warning
|
| 20 |
warnings.filterwarnings(
|
|
|
|
| 187 |
|
| 188 |
def create_builtin_tools() -> list[ToolSpec]:
|
| 189 |
"""Create built-in tool specifications"""
|
| 190 |
+
print(f"Creating built-in tools: {HF_JOBS_TOOL_SPEC['name']}, {PLAN_TOOL_SPEC['name']}")
|
| 191 |
return [
|
| 192 |
ToolSpec(
|
| 193 |
name=HF_JOBS_TOOL_SPEC["name"],
|
|
|
|
| 195 |
parameters=HF_JOBS_TOOL_SPEC["parameters"],
|
| 196 |
handler=hf_jobs_handler,
|
| 197 |
),
|
| 198 |
+
ToolSpec(
|
| 199 |
+
name=PLAN_TOOL_SPEC["name"],
|
| 200 |
+
description=PLAN_TOOL_SPEC["description"],
|
| 201 |
+
parameters=PLAN_TOOL_SPEC["parameters"],
|
| 202 |
+
handler=plan_tool_handler,
|
| 203 |
+
),
|
| 204 |
]
|