Update openai.py

This commit is contained in:
hrz 2025-06-30 10:41:15 +08:00 committed by GitHub
parent 0f31bfc78f
commit 26553b8875
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,7 +18,8 @@ class LLMProvider(LLMProviderBase):
else:
self.base_url = config.get("url")
# 增加timeout的配置项,单位为秒
self.timeout = config.get("timeout", 300.0)
timeout = config.get("timeout", 300)
self.timeout = int(timeout) if timeout else 300
param_defaults = {
"max_tokens": (500, int),