Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: toolhub request_timeout should be str #15

Merged
merged 1 commit into from
Apr 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/plugin_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def activate_plugins(self): # 生成新开启的插件实例
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
Expand Down
2 changes: 1 addition & 1 deletion plugins/tool/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def _build_tool_kwargs(self, kwargs: dict):
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
Expand Down