Skip to main content

recover_or_terminate

Function recover_or_terminate 

Source
fn recover_or_terminate(
    error: ChatbotError,
    tool_name: &str,
    context: &str,
) -> ChatbotResult<String>
Expand description

Decides whether a tool-call error ends the turn or is reported to the LLM as a failed call.

context opens the warning logged for the non-terminating case; the caller still owns whether the recovered text is wrapped as a suspended call’s answer or a served call’s output.