mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-08-06 17:38:35 +00:00
fix(cron): respect deliver flag before message tool check
When deliver: false is set in cron job payload, suppress all output even when agent calls message tool during the turn. Closes #3115
This commit is contained in:
parent
dec26396ed
commit
76683dd18a
@ -729,7 +729,7 @@ def gateway(
|
|||||||
response = resp.content if resp else ""
|
response = resp.content if resp else ""
|
||||||
|
|
||||||
message_tool = agent.tools.get("message")
|
message_tool = agent.tools.get("message")
|
||||||
if isinstance(message_tool, MessageTool) and message_tool._sent_in_turn:
|
if job.payload.deliver and isinstance(message_tool, MessageTool) and message_tool._sent_in_turn:
|
||||||
return response
|
return response
|
||||||
|
|
||||||
if job.payload.deliver and job.payload.to and response:
|
if job.payload.deliver and job.payload.to and response:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user