replace_in_history
replace_in_history
Control how this function call appears in the AI’s conversation history. Use this to remove sensitive information (credit card numbers, SSNs) or replace verbose tool results with concise summaries.
When True is passed, the entire tool-call/result pair is removed from history.
When a string is passed, the pair is replaced with that text as an assistant message.
Parameters
text
True— remove the tool-call and result pair from history entirely- A
str— replace the pair with an assistant message containing this text
Returns
FunctionResult — self, for chaining.