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
29.84k stars 7.88k forks source link

voice_to_text not in available_setting #1513

Closed dfldylan closed 10 months ago

dfldylan commented 10 months ago

前置确认

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

操作系统类型?

Docker

运行的python版本是?

other

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

Latest Release

运行的channel类型是?

wx(个人微信, itchat)

复现步骤 🕹

version: '2.0' services: chatgpt-on-wechat: image: zhayujie/chatgpt-on-wechat container_name: chatgpt-on-wechat restart: always security_opt:

问题描述 😯

可以扫码登录,但是发送消息就提示

key :voice_to_text not in available_setting

终端日志 📒

noroot@16fb28679dae:/app$ cat run.log 
[INFO][2023-11-10 10:46:54][config.py:212] - [INIT] override config by environ args: linkai_api_key=xxx
[INFO][2023-11-10 10:46:54][config.py:212] - [INIT] override config by environ args: hot_reload=true
[INFO][2023-11-10 10:46:54][config.py:212] - [INIT] override config by environ args: group_chat_prefix=["@闸总"]
[INFO][2023-11-10 10:46:54][config.py:212] - [INIT] override config by environ args: single_chat_reply_prefix="[闸总] "
[INFO][2023-11-10 10:46:54][config.py:212] - [INIT] override config by environ args: conversation_max_tokens=1000
[INFO][2023-11-10 10:46:54][config.py:212] - [INIT] override config by environ args: open_ai_api_base=https://api.chatanywhere.com.cn/v1
[INFO][2023-11-10 10:46:54][config.py:212] - [INIT] override config by environ args: expires_in_seconds=3600
[INFO][2023-11-10 10:46:54][config.py:212] - [INIT] override config by environ args: single_chat_prefix=[""]
[INFO][2023-11-10 10:46:54][config.py:212] - [INIT] override config by environ args: model=gpt-3.5-turbo
[INFO][2023-11-10 10:46:54][config.py:212] - [INIT] override config by environ args: use_linkai=true
[INFO][2023-11-10 10:46:54][config.py:212] - [INIT] override config by environ args: group_chat_in_one_session=["ALL_GROUP"]
[INFO][2023-11-10 10:46:54][config.py:212] - [INIT] override config by environ args: character_desc=你是ChatGPT, 一个由OpenAI训练的大型语言模型, 你旨在回答并解决人们的任何问题,并且可以使用多种语言与人交流。
[INFO][2023-11-10 10:46:54][config.py:212] - [INIT] override config by environ args: linkai_app_code=default
[INFO][2023-11-10 10:46:54][config.py:212] - [INIT] override config by environ args: speech_recognition=true
[INFO][2023-11-10 10:46:54][config.py:212] - [INIT] override config by environ args: group_name_white_list=["ALL_GROUP"]
[INFO][2023-11-10 10:46:54][config.py:212] - [INIT] override config by environ args: use_global_plugin_config=True
[INFO][2023-11-10 10:46:54][config.py:212] - [INIT] override config by environ args: open_ai_api_key=sk-xxx
[INFO][2023-11-10 10:46:54][config.py:227] - [INIT] load config: {'channel_type': 'wx', 'open_ai_api_key': 'sk-xxx', 'model': 'gpt-3.5-turbo', 'text_to_image': 'dall-e-2', 'voice_to_text': 'openai', 'text_to_voice': 'openai', 'proxy': '', 'hot_reload': True, 'single_chat_prefix': [''], 'single_chat_reply_prefix': '[闸总] ', 'group_chat_prefix': ['@闸总'], 'group_name_white_list': ['ALL_GROUP'], 'group_chat_in_one_session': ['ALL_GROUP'], 'image_create_prefix': ['画'], 'speech_recognition': True, 'group_speech_recognition': False, 'voice_reply_voice': False, 'tts_voice_id': 'alloy', 'conversation_max_tokens': 1000, 'expires_in_seconds': 3600, 'character_desc': '你是ChatGPT, 一个由OpenAI训练的大型语言模型, 你旨在回答并解决人们的任何问题,并且可以使用多种语言与人交流。', 'temperature': 0.7, 'top_p': 1, 'subscribe_msg': '感谢您的关注!\n这里是ChatGPT,可以自由对话。\n支持语音对话。\n支持图片输入。\n支持图片输出,画字开头的消息将按要求创作图片。\n支持tool、角色扮演和文字冒险等丰富的插件。\n输入{trigger_prefix}#help 查看详细指令。', 'use_linkai': True, 'linkai_api_key': 'xxx', 'linkai_app_code': 'default', 'open_ai_api_base': 'https://api.chatanywhere.com.cn/v1', 'use_global_plugin_config': True}
[INFO][2023-11-10 10:46:54][config.py:177] - [Config] User datas file not found, ignore.
[WARNING][2023-11-10 10:46:55][audio_convert.py:9] - import pysilk failed, wechaty voice message will not be supported.
[INFO][2023-11-10 10:46:55][plugin_manager.py:50] - Loading plugins config...
[INFO][2023-11-10 10:46:55][plugin_manager.py:88] - Scaning plugins ...
[INFO][2023-11-10 10:46:55][plugin_manager.py:41] - Plugin Banwords_v1.0 registered, path=./plugins/banwords
[INFO][2023-11-10 10:46:55][plugin_manager.py:41] - Plugin BDunit_v0.1 registered, path=./plugins/bdunit
[INFO][2023-11-10 10:46:55][plugin_manager.py:41] - Plugin Dungeon_v1.0 registered, path=./plugins/dungeon
[INFO][2023-11-10 10:46:55][plugin_manager.py:41] - Plugin Finish_v1.0 registered, path=./plugins/finish
[INFO][2023-11-10 10:46:56][plugin_manager.py:41] - Plugin Godcmd_v1.0 registered, path=./plugins/godcmd
[INFO][2023-11-10 10:46:56][plugin_manager.py:41] - Plugin Hello_v0.1 registered, path=./plugins/hello
[INFO][2023-11-10 10:46:56][plugin_manager.py:41] - Plugin Keyword_v0.1 registered, path=./plugins/keyword
[INFO][2023-11-10 10:46:56][plugin_manager.py:41] - Plugin linkai_v0.1.0 registered, path=./plugins/linkai
[INFO][2023-11-10 10:46:56][plugin_manager.py:41] - Plugin Role_v1.0 registered, path=./plugins/role
[INFO][2023-11-10 10:46:57][plugin_manager.py:41] - Plugin tool_v0.4 registered, path=./plugins/tool
[INFO][2023-11-10 10:46:57][plugin_manager.py:123] - Plugin GODCMD not found in pconfig, adding to pconfig...
[INFO][2023-11-10 10:46:57][plugin_manager.py:123] - Plugin KEYWORD not found in pconfig, adding to pconfig...
[INFO][2023-11-10 10:46:57][plugin_manager.py:123] - Plugin BANWORDS not found in pconfig, adding to pconfig...
[INFO][2023-11-10 10:46:57][plugin_manager.py:123] - Plugin LINKAI not found in pconfig, adding to pconfig...
[INFO][2023-11-10 10:46:57][plugin_manager.py:123] - Plugin TOOL not found in pconfig, adding to pconfig...
[INFO][2023-11-10 10:46:57][plugin_manager.py:123] - Plugin ROLE not found in pconfig, adding to pconfig...
[INFO][2023-11-10 10:46:57][plugin_manager.py:123] - Plugin DUNGEON not found in pconfig, adding to pconfig...
[INFO][2023-11-10 10:46:57][plugin_manager.py:123] - Plugin BDUNIT not found in pconfig, adding to pconfig...
[INFO][2023-11-10 10:46:57][plugin_manager.py:123] - Plugin HELLO not found in pconfig, adding to pconfig...
[INFO][2023-11-10 10:46:57][plugin_manager.py:123] - Plugin FINISH not found in pconfig, adding to pconfig...
[INFO][2023-11-10 10:46:57][plugin_manager.py:80] - load all config from plugins/config.json: {'godcmd': {'password': '0211', 'admin_users': ['ing']}, 'linkai': {'group_app_map': {'闸总的编程': 'coder-king', '闸总的绘画': 'midjourney', '闸总的思考': 'agent', '闸总懂法': '7ppneuCy', '闸总懂你': '0tpGXIM4'}, 'midjourney': {'enabled': True, 'auto_translate': True, 'img_proxy': True, 'max_tasks': 3, 'max_tasks_per_user': 1, 'use_image_create_prefix': False}, 'summary': {'enabled': True, 'group_enabled': True, 'max_file_size': 5000}}}
[INFO][2023-11-10 10:46:57][godcmd.py:210] - [Godcmd] inited
[INFO][2023-11-10 10:46:57][keyword.py:40] - [keyword] {}
[INFO][2023-11-10 10:46:57][keyword.py:42] - [keyword] inited.
[WARNING][2023-11-10 10:46:57][banwords.py:54] - [Banwords] init failed, ignore or see https://github.com/zhayujie/chatgpt-on-wechat/tree/master/plugins/banwords .
[WARNING][2023-11-10 10:46:57][plugin_manager.py:148] - Failed to init BANWORDS, diabled. [Errno 2] No such file or directory: '/app/plugins/banwords/banwords.txt'
[INFO][2023-11-10 10:46:57][linkai.py:33] - [LinkAI] inited, config={'group_app_map': {'闸总的编程': 'coder-king', '闸总的绘画': 'midjourney', '闸总的思考': 'agent', '闸总懂法': '7ppneuCy', '闸总懂你': '0tpGXIM4'}, 'midjourney': {'enabled': True, 'auto_translate': True, 'img_proxy': True, 'max_tasks': 3, 'max_tasks_per_user': 1, 'use_image_create_prefix': False}, 'summary': {'enabled': True, 'group_enabled': True, 'max_file_size': 5000}}
[INFO][2023-11-10 10:46:58][tool.py:31] - [tool] inited
[INFO][2023-11-10 10:46:58][role.py:69] - [Role] inited
[INFO][2023-11-10 10:46:58][dungeon.py:56] - [Dungeon] inited
[WARNING][2023-11-10 10:46:58][bdunit.py:42] - [BDunit] init failed, ignore 
[WARNING][2023-11-10 10:46:58][plugin_manager.py:148] - Failed to init BDUNIT, diabled. config.json not found
[INFO][2023-11-10 10:46:58][hello.py:24] - [Hello] inited
[INFO][2023-11-10 10:46:58][finish.py:23] - [Finish] inited
[INFO][2023-11-10 10:47:17][wechat_channel.py:126] - Wechat login success, user_id: @ce4ba64d2daf6b66ff7b0448f6ebbb41b95e54fb6715ee3864e5728998de75aa, nickname: 闸总
[ERROR][2023-11-10 10:48:09][chat_channel.py:285] - Worker return exception: key :voice_to_text not in available_setting
NoneType: None
noroot@16fb28679dae:/app$ 
dfldylan commented 10 months ago

把USE_LINKAI改成false就好使了

[INFO][2023-11-10 11:03:22][wechat_channel.py:126] - Wechat login success, user_id: @896186316bc8cfd0dc9a1c1da00130b2ed195c7a1d4d5f478b082052f1f23efa, nickname: 闸总
[INFO][2023-11-10 11:03:28][bridge.py:43] - create bot chatGPT for chat
[INFO][2023-11-10 11:03:28][chat_gpt_bot.py:49] - [CHATGPT] query=在吗
[INFO][2023-11-10 11:03:33][wechat_channel.py:191] - [WX] sendMsg=Reply(type=TEXT, content=[闸总] 是的,我在这里。有什么我可以帮助你的吗?), receiver=@00c2250961b328762508c90d6258df6141e66136005bcef6919224a86863f247
zhayujie commented 10 months ago

再拉一下最新代码哈,后面又更新了