call subordinate fix

frdel committed Dec 3, 2024 at 22:42 UTC f6977546c11b63e2e47dce8367cad8a6c62248fc
2 files changed +2 -4
prompts/default/fw.call_subordinate.md deleted
-1
@@ -1 +0,0 @@
1 -{{message}}
\ No newline at end of file
python/tools/call_subordinate.py
+2 -3
@@ -1,4 +1,4 @@
1 -from agent import Agent
1 +from agent import Agent, UserMessage
2 from python.helpers.tool import Tool, Response
3
4
@@ -18,8 +18,7 @@ class Delegation(Tool):
18
19 # add user message to subordinate agent
20 subordinate: Agent = self.agent.get_data(Agent.DATA_NAME_SUBORDINATE)
21 - template = self.agent.read_prompt("fw.call_subordinate.md", message=message)
22 - await subordinate.hist_add_user_message(template)
21 + await subordinate.hist_add_user_message(UserMessage(message=message, attachments=[]))
22 # run subordinate monologue
23 result = await subordinate.monologue()
24 # result