Skip to content

Commit 746ffd3

Browse files
committed
feat:为子代理增加远程图片URL参数支持
1 parent b8728cd commit 746ffd3

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

astrbot/core/agent/handoff.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ def default_parameters(self) -> dict:
4444
"type": "string",
4545
"description": "The input to be handed off to another agent. This should be a clear and concise request or task.",
4646
},
47+
"image_urls": {
48+
"type": "array",
49+
"items": {"type": "string"},
50+
"description": "Optional: List of public image URLs for multi-modal tasks (e.g. video generation reference images).",
51+
},
4752
"background_task": {
4853
"type": "boolean",
4954
"description": (

astrbot/core/astr_agent_tool_exec.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ async def _execute_handoff(
9999
**tool_args,
100100
):
101101
input_ = tool_args.get("input")
102+
image_urls = tool_args.get("image_urls")
102103

103104
# make toolset for the agent
104105
tools = tool.agent.tools
@@ -143,6 +144,7 @@ async def _execute_handoff(
143144
event=event,
144145
chat_provider_id=prov_id,
145146
prompt=input_,
147+
image_urls=image_urls,
146148
system_prompt=tool.agent.instructions,
147149
tools=toolset,
148150
contexts=contexts,

0 commit comments

Comments
 (0)