set_tool_response
set_tool_response
Set the structured form of the response, separating what the tool did from what the model should say next. The response becomes an object with up to two keys:
Splitting them keeps the model from reading a status line aloud, and keeps the
spoken instruction from being mistaken for data. For a single instruction
string, use set_response().
Parameters
tool_result
What the tool did: a factual status line for the model to reason from, such
as "payment declined" or "3 seats left". Omit it when there is nothing
to report beyond the instruction.
tool_prompt
What the model should now say, as an instruction in the second person. Omit it for a silent, status-only result.
Returns
FunctionResult — self, for chaining.