如何为 AI 智能体工具调用设置超时,避免一个慢 API 拖死整个 run
How to set an AI agent tool call timeout before one slow API stalls a run
AI 导读
这篇教程讲解如何为 AI 智能体的工具调用设置超时。requests 库默认无超时,OpenAI 和 Anthropic 的 Python SDK 都默认 10 分钟,卡住的调用会拖住整个 run。
How to set an AI agent tool call timeout before one slow API stalls a run
这篇教程讲解如何为 AI 智能体的工具调用设置超时。requests 库默认无超时,OpenAI 和 Anthropic 的 Python SDK 都默认 10 分钟,卡住的调用会拖住整个 run。