mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-05-01 21:20:33 +00:00
call subordinate fix
This commit is contained in:
parent
fbe47ac03e
commit
f6977546c1
2 changed files with 2 additions and 4 deletions
|
|
@ -1,4 +1,4 @@
|
|||
from agent import Agent
|
||||
from agent import Agent, UserMessage
|
||||
from python.helpers.tool import Tool, Response
|
||||
|
||||
|
||||
|
|
@ -18,8 +18,7 @@ class Delegation(Tool):
|
|||
|
||||
# add user message to subordinate agent
|
||||
subordinate: Agent = self.agent.get_data(Agent.DATA_NAME_SUBORDINATE)
|
||||
template = self.agent.read_prompt("fw.call_subordinate.md", message=message)
|
||||
await subordinate.hist_add_user_message(template)
|
||||
await subordinate.hist_add_user_message(UserMessage(message=message, attachments=[]))
|
||||
# run subordinate monologue
|
||||
result = await subordinate.monologue()
|
||||
# result
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue