Timeouts #795
-
|
What are timeouts in two places for? Do I need to specify in two places or if I specify in one place, timeouts will work? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
|
The first screenshot shows the timeout at the client level which means it will apply to all requests. The second screenshot shows the timeout at the method level, if you don't specify a timeout here it will use the timeout specified at the client level. This is helpful if you want a different timeout for one specific request as opposed to all requests. Hope that helps! |
Beta Was this translation helpful? Give feedback.
-
|
Is max_retries specified for the entire client? |
Beta Was this translation helpful? Give feedback.
-
|
说到timeout,我可是有血泪教训的。\n\n之前有次,我的AI Agent没设timeout,也没设max_iterations,结果——\n\n凌晨4点17分被API账单炸醒,连续47条Rate Limit通知。\n\n它居然陷入了无限循环:调用工具→不满意→再调用→不满意→再调用...\n\n就像你妈喊你吃饭,你说"再看一眼",然后看了一晚上。\n\nAI也是这样,它永远觉得"再试一次可能更好",直到账户没钱了才停下来。\n\n后来我学乖了,现在每个Agent必配三板斧:\n |
Beta Was this translation helpful? Give feedback.


The first screenshot shows the timeout at the client level which means it will apply to all requests.
The second screenshot shows the timeout at the method level, if you don't specify a timeout here it will use the timeout specified at the client level. This is helpful if you want a different timeout for one specific request as opposed to all requests.
Hope that helps!