From 2f732e5493c6288f6a04405e858618fe87a25c90 Mon Sep 17 00:00:00 2001 From: lanvent Date: Mon, 17 Apr 2023 12:00:28 +0800 Subject: [PATCH] fix: toolhub request_timeout should be str --- plugins/plugin_manager.py | 2 +- plugins/tool/tool.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/plugin_manager.py b/plugins/plugin_manager.py index 44b400d..b014e5f 100644 --- a/plugins/plugin_manager.py +++ b/plugins/plugin_manager.py @@ -148,7 +148,7 @@ class PluginManager: try: instance = plugincls() 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) failed_plugins.append(name) continue diff --git a/plugins/tool/tool.py b/plugins/tool/tool.py index a8c4817..5457ace 100644 --- a/plugins/tool/tool.py +++ b/plugins/tool/tool.py @@ -135,7 +135,7 @@ class Tool(Plugin): return { "openai_api_key": conf().get("open_ai_api_key", ""), "proxy": conf().get("proxy", ""), - "request_timeout": conf().get("request_timeout", 60), + "request_timeout": str(conf().get("request_timeout", 60)), # note: 目前tool暂未对其他模型测试,但这里仍对配置来源做了优先级区分,一般插件配置可覆盖全局配置 "model_name": tool_model_name if tool_model_name