mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-07-20 21:57:14 +08:00
fix: toolhub request_timeout should be str
This commit is contained in:
@@ -148,7 +148,7 @@ class PluginManager:
|
|||||||
try:
|
try:
|
||||||
instance = plugincls()
|
instance = plugincls()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warn("Failed to init %s, diabled. %s" % (name, e))
|
logger.error("Failed to init %s, diabled. %s" % (name, e))
|
||||||
self.disable_plugin(name)
|
self.disable_plugin(name)
|
||||||
failed_plugins.append(name)
|
failed_plugins.append(name)
|
||||||
continue
|
continue
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ class Tool(Plugin):
|
|||||||
return {
|
return {
|
||||||
"openai_api_key": conf().get("open_ai_api_key", ""),
|
"openai_api_key": conf().get("open_ai_api_key", ""),
|
||||||
"proxy": conf().get("proxy", ""),
|
"proxy": conf().get("proxy", ""),
|
||||||
"request_timeout": conf().get("request_timeout", 60),
|
"request_timeout": str(conf().get("request_timeout", 60)),
|
||||||
# note: 目前tool暂未对其他模型测试,但这里仍对配置来源做了优先级区分,一般插件配置可覆盖全局配置
|
# note: 目前tool暂未对其他模型测试,但这里仍对配置来源做了优先级区分,一般插件配置可覆盖全局配置
|
||||||
"model_name": tool_model_name
|
"model_name": tool_model_name
|
||||||
if tool_model_name
|
if tool_model_name
|
||||||
|
|||||||
Reference in New Issue
Block a user