call subordinate fix

This commit is contained in:
frdel committed 2024-12-03 22:42:36 +01:00
1 parent fbe47ac03e
commit f6977546c1
2 files changed
+2 -4

No files matched your search

-1
View File
@@ -1 +0,0 @@
{{message}}
+2 -3
View File
@@ -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