mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-27 04:49:47 +01:00
Update openai.py
This commit is contained in:
parent
0f31bfc78f
commit
26553b8875
1 changed files with 2 additions and 1 deletions
|
|
@ -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),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue