fix(backend): we're making loops (#10514)

This commit is contained in:
Nicholas Tindle
2025-07-31 10:18:37 -05:00
committed by GitHub
parent 903a3b80b4
commit 9ce857e29f

View File

@@ -529,15 +529,6 @@ class SmartDecisionMakerBlock(Block):
)
)
# Add reasoning to conversation history if available
if response.reasoning:
prompt.append(
{"role": "assistant", "content": f"[Reasoning]: {response.reasoning}"}
)
prompt.append(response.raw_response)
yield "conversations", prompt
if not response.tool_calls:
yield "finished", response.response
return
@@ -571,3 +562,12 @@ class SmartDecisionMakerBlock(Block):
yield f"tools_^_{tool_name}_~_{arg_name}", tool_args[arg_name]
else:
yield f"tools_^_{tool_name}_~_{arg_name}", None
# Add reasoning to conversation history if available
if response.reasoning:
prompt.append(
{"role": "assistant", "content": f"[Reasoning]: {response.reasoning}"}
)
prompt.append(response.raw_response)
yield "conversations", prompt