mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-27 17:43:55 +08:00
Update openai.py
This commit is contained in:
@@ -18,7 +18,8 @@ class LLMProvider(LLMProviderBase):
|
|||||||
else:
|
else:
|
||||||
self.base_url = config.get("url")
|
self.base_url = config.get("url")
|
||||||
# 增加timeout的配置项,单位为秒
|
# 增加timeout的配置项,单位为秒
|
||||||
self.timeout = config.get("timeout", 300.0)
|
timeout = config.get("timeout", 300)
|
||||||
|
self.timeout = int(timeout) if timeout else 300
|
||||||
|
|
||||||
param_defaults = {
|
param_defaults = {
|
||||||
"max_tokens": (500, int),
|
"max_tokens": (500, int),
|
||||||
|
|||||||
Reference in New Issue
Block a user