Skip to main content

handle_context_overflow

Function handle_context_overflow 

Source
pub fn handle_context_overflow(
    status: u16,
    message: &str,
    max_thinking_tokens: u64,
) -> Result<u64, OverflowRecoveryError>
Expand description

处理上下文溢出错误

返回调整后的 max_tokens,如果无法恢复则返回错误