zhayujie / chatgpt-on-wechat

基于大模型搭建的聊天机器人,同时支持 微信公众号、企业微信应用、飞书、钉钉 等接入,可选择GPT3.5/GPT-4o/GPT-o1/ Claude/文心一言/讯飞星火/通义千问/ Gemini/GLM-4/Claude/Kimi/LinkAI,能处理文本、语音和图片,访问操作系统和互联网,支持基于自有知识库进行定制企业智能客服。
https://docs.link-ai.tech/cow
MIT License
31.55k stars 8.21k forks source link

docker部署,tool无法启动,报错:Failed to init TOOL, diabled. implement me! #1569

Open shanggangli opened 12 months ago

shanggangli commented 12 months ago

前置确认

⚠️ 搜索issues中是否已存在类似问题

操作系统类型?

Docker

运行的python版本是?

python 3.7

使用的chatgpt-on-wechat版本是?

Latest Release

运行的channel类型是?

wx(个人微信, itchat)

复现步骤 🕹

No response

问题描述 😯

有没有大佬帮忙看看tool插件无法启动的问题:

背景

国内服务器、docker部署方式、使用微软Azure 提供的openAI 服务

报错情况

image image image

tool config

{ "godcmd": { "password": "111231", "admin_users": ["S1231"] }, "banwords": { "action": "replace", "reply_filter": true, "reply_action": "ignore" }, "tool": { "tools": [ "python", "url-get", "terminal", "meteo-weather", "bing-search", "arxiv", "wikipedia" ], "kwargs": { "debug":true, "top_k_results": 2, "no_default": false, "model_name": "s*_turbo", "bing_subscription_key":"86d2b4***f6dc9", "meteo_weather_key":"9256c534245d", "arxiv_summary":true, "open_ai_api_key": "74417fd8511111", "open_ai_api_base": "https12312", "azure_deployment_id": "sgpt4", "llm_api_key": "744171213" } }, "Apilot":{ "alapi_token":"XPuclv1123", "morning_news_text_enabled":false }, "linkai": { "group_app_map": { "测试群1": "default", "测试群2": "Kv2fXJcH" }, "midjourney": { "enabled": true, "auto_translate": true, "img_proxy": true, "max_tasks": 3, "max_tasks_per_user": 1, "use_image_create_prefix": true } } }

app config

{ "channel_type": "wx", "model": "sg_gpt4", "open_ai_api_key": "74417fd2134", "use_azure_chatgpt": true, "open_ai_api_base": "https:azure.com/", "azure_api_version": "2023-12-01-preview", "azure_deployment_id": "pt4", "text_to_image": "dalle3", "voice_to_text": "azure", "text_to_voice": "azure", "proxy": "", "hot_reload": false, "single_chat_prefix": ["","bot"], "single_chat_reply_prefix": "[bot] ", "group_chat_prefix": [ "@bot","bot" ], "group_name_white_list": ["ALL_GROUP" ], "group_chat_in_one_session": [ "得21312" ], "image_create_prefix": [ "画" ], "speech_recognition": true, "group_speech_recognition": false, "voice_reply_voice": false, "conversation_max_tokens": 2500, "expires_in_seconds": 3600, "character_desc": "你是使用多种语言与人交流。", "temperature": 0.7, "top_p": 1, "subscribe_msg": "感谢您*****igger_prefix}#help 查看详细指令。", "use_linkai": false, "linkai_api_key": "", "linkai_app_code": "" }

终端日志 📒

[DEBUG][2023-12-05 03:02:38][plugin_manager.py:187] - Plugin GODCMD triggered by event Event.ON_HANDLE_CONTEXT
[DEBUG][2023-12-05 03:02:38][godcmd.py:220] - [Godcmd] on_handle_context. content: #enablep tool
[DEBUG][2023-12-05 03:02:38][plugin.py:27] - loading plugin config, plugin_name=tool, conf={'tools': ['python', 'url-get', 'terminal', 'meteo-weather', 'bing-search', 'arxiv', 'wikipedia'], 'kwargs': {'debug': True, 'top_k_results': 2, 'no_default': False, 'model_name': 'sg_gpt35_turbo', 'bing_subscription_key': '86d2b43bbad94858********3cf6dc9', 'meteo_weather_key': '9256c53424c96513d858********845d', 'arxiv_summary': True, 'open_ai_api_key': '74417fd858********, 'open_ai_api_base': 'https:858********enai.azure.com/', 'azure_deployment_id': '1*****gpt4', 'llm_api_key': '74417fd8858********571216'}}
[WARNING][2023-12-05 03:02:38][plugin_manager.py:148] - Failed to init TOOL, diabled. implement me!
[DEBUG][2023-12-05 03:02:38][godcmd.py:421] - [Godcmd] admin command: enablep by @09aa0fab1821fdeceda20601654833b82c2c71a7238858****************2da03
[DEBUG][2023-12-05 03:02:38][plugin_manager.py:192] - Plugin GODCMD breaked event Event.ON_HANDLE_CONTEXT
[DEBUG][2023-12-05 03:02:38][chat_channel.py:170] - [WX] ready to decorate reply: Reply(type=ERROR, content=插件开启失败)
[DEBUG][2023-12-05 03:02:38][chat_channel.py:282] - [WX] ready to send reply: Reply(type=ERROR, content=[ERROR]
插件开启失败), context: Context(type=TEXT, content=#enablep tool, kwargs={'isgroup': False, 'msg': <channel.wechat.wechat_message.WechatMessage object at 0x7fb9881f4d00>, 'origin_ctype': <ContextType.TEXT: 1>, 'openai_api_key': None, 'gpt_model': None, 'session_id': '@09aa0fab1821fdeceda20601654833b82c2c71a858********065deb61b2da03', 'receiver': '@09aa0fab1821fdeceda20601654833b82c2c71a7858********65deb61b2da03'})
[INFO][2023-12-05 03:02:38][wechat_channel.py:194] - [WX] sendMsg=Reply(type=ERROR, content=[ERROR]
插件开启失败), receiver=@09aa0fab1821fdeceda20601654833858********61b2da03
[DEBUG][2023-12-05 03:02:38][chat_channel.py:298] - Worker return success, session_id = @09aa0fab1821fdeceda20601654833858********711f8dd065deb61b2da03
zhayujie commented 12 months ago

tool 插件启动失败,应该是不影响正常使用的。 可以看下 chatgpt_tool_hub 这个依赖有没有安装

shanggangli commented 11 months ago

连接不了 bing search,有点难受

samyeei commented 11 months ago

我的情况完全一样,docker环境下插件无法使用,请问toolhub依赖在docker要如何安装?

huangAoJiong commented 11 months ago

服务器跑的,chatgpt_tool_hub 这个依赖也有,仍是启动tool失败

fatbun commented 11 months ago

同遇到这个问题

enjoyour commented 6 months ago

同遇到这个问题

seraph333 commented 3 months ago

tool目录下没有config.json会无法启用,手动复制config.json.template,改名config.json试试