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
30.3k stars 7.97k forks source link

企业微信对接openAI代理服务器正常收发,但是总有[ERROR]前缀 #1300

Open dongbeixiaohuo opened 1 year ago

dongbeixiaohuo commented 1 year ago

前置确认

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

操作系统类型?

Linux

运行的python版本是?

python 3.10

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

Latest Release

运行的channel类型是?

other

复现步骤 🕹

无论问任何问题,都会有一个[ERROR]的前缀。

问题描述 😯

使用正常,无论问任何问题,都会有一个[ERROR]的前缀。

终端日志 📒

root@wecomchat:/home/wecom/chatgpt-on-wechat# python3  app.py
[INFO][2023-07-05 14:42:40][config.py:201] - [INIT] load config: {'open_ai_api_key': 'fastgpt-eaun349qu742l6mif7wx0ffs-64a117b6adbf81f2600e12b4', 'open_ai_api_base': 'http://ipadd:3000/api/openapi/v1', 'model': 'gpt-3.5-turbo', 'use_azure_chatgpt': False, 'azure_deployment_id': 'gpt35', 'single_chat_prefix': [''], 'single_chat_reply_prefix': '[bot] ', 'group_chat_prefix': ['@bot'], 'group_name_white_list': ['ChatGPT测试群', 'ChatGPT测试群2'], 'group_chat_in_one_session': ['ChatGPT测试群'], 'image_create_prefix': ['画', '看', '找'], 'conversation_max_tokens': 1000, 'speech_recognition': False, 'group_speech_recognition': False, 'character_desc': '你是ChatGPT, 一个由OpenAI训练的大型语言模型, 你旨在回答并解决人们的任何问题,并且可以使用多种语言与人交流。', 'subscribe_msg': '感谢您的关注!', 'channel_type': 'wechatcom_app', 'wechatcom_corp_id': 'wx448b9f0', 'wechatcomapp_token': 'a9D6x1aCXpKV54', 'wechatcomapp_port': 9898, 'wechatcomapp_secret': 'd1oa8Ut_0C1kKtYI_ExGg7CjhCezAO-820q8', 'wechatcomapp_agent_id': '1000017', 'wechatcomapp_aes_key': 'SvNCjUXTdglpTRk3hRNjXmV', 'use_linkai': False, 'linkai_api_key': 'Link_LswD7Z9gxwaIXt99mOPLwHPoYf9', 'linkai_app_code': 'sVDi9QR2'}
[INFO][2023-07-05 14:42:40][config.py:149] - [Config] User datas loaded.
/usr/local/lib/python3.8/dist-packages/pydub/utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
  warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)
wx448b9619a4b5dcf0 d1oa8Ut_0C1kKtYI_ExGg7CjhEmh9sWMCezAO-820q8 1000017 a9D6x1aCXzTHiRz8KFpKV54 SvNCjUXTdglpTRk3hRNjXmnekLX3krSiY9YMmBctFvV
[INFO][2023-07-05 14:42:40][wechatcomapp_channel.py:39] - [wechatcom] init: corp_id: w19a4b5dcf0, secret: d1oa8Ut_0C1kKtYI_ExGg7CjhzAO-820q8, agent_id: 107, token: a9D6x1aCXzKV54, aes_key: SvNCjUXTdglpTRk3hRNjXYMmBctFvV
[INFO][2023-07-05 14:42:40][plugin_manager.py:50] - Loading plugins config...
[INFO][2023-07-05 14:42:40][plugin_manager.py:66] - Scaning plugins ...
[INFO][2023-07-05 14:42:40][plugin_manager.py:41] - Plugin Dungeon_v1.0 registered, path=./plugins/dungeon
[INFO][2023-07-05 14:42:40][plugin_manager.py:41] - Plugin BDunit_v0.1 registered, path=./plugins/bdunit
[INFO][2023-07-05 14:42:40][plugin_manager.py:41] - Plugin Finish_v1.0 registered, path=./plugins/finish
[INFO][2023-07-05 14:42:40][plugin_manager.py:41] - Plugin Godcmd_v1.0 registered, path=./plugins/godcmd
[INFO][2023-07-05 14:42:40][plugin_manager.py:41] - Plugin Keyword_v0.1 registered, path=./plugins/keyword
[INFO][2023-07-05 14:42:40][plugin_manager.py:41] - Plugin Banwords_v1.0 registered, path=./plugins/banwords
[INFO][2023-07-05 14:42:40][plugin_manager.py:41] - Plugin Hello_v0.1 registered, path=./plugins/hello
[INFO][2023-07-05 14:42:40][plugin_manager.py:41] - Plugin Role_v1.0 registered, path=./plugins/role
chatgpt-tool-hub version: 0.4.4
[INFO][2023-07-05 14:42:41][plugin_manager.py:41] - Plugin tool_v0.4 registered, path=./plugins/tool
[INFO][2023-07-05 14:42:41][godcmd.py:193] - [Godcmd] 因未设置口令,本次的临时口令为2374。
[INFO][2023-07-05 14:42:41][godcmd.py:208] - [Godcmd] inited
[INFO][2023-07-05 14:42:41][keyword.py:40] - [keyword] {}
[INFO][2023-07-05 14:42:41][keyword.py:42] - [keyword] inited.
[INFO][2023-07-05 14:42:41][__init__.py:29] - [visual_dl] init failed, error_info: ModuleNotFoundError("No module named 'torch'")
[INFO][2023-07-05 14:42:41][__init__.py:29] - [visual_dl] init failed, error_info: ModuleNotFoundError("No module named 'torch'")
[INFO][2023-07-05 14:42:41][chatgpt.py:183] - proxy no find, directly request to chatgpt instead
[INFO][2023-07-05 14:42:41][chatgpt.py:188] - success use customized api base url: http://208:3000/api/openapi/v1
[INFO][2023-07-05 14:42:41][chatgpt.py:183] - proxy no find, directly request to chatgpt instead
[INFO][2023-07-05 14:42:41][victorinox.py:86] - use_tools=['terminal', 'url-get', 'meteo-weather', 'python'], params: {'debug': False, 'openai_api_key': '6adbf81f2600e12b4', 'open_ai_api_base': 'http://20.88:3000/api/openapi/v1', 'proxy': '', 'request_timeout': 120, 'model_name': 'gpt-3.5-turbo', 'no_default': False, 'top_k_results': 3, 'news_api_key': '', 'bing_subscription_key': '', 'google_api_key': '', 'google_cse_id': '', 'searx_search_host': '', 'wolfram_alpha_appid': '', 'morning_news_api_key': '', 'cuda_device': 'cpu', 'think_depth': 3, 'arxiv_summary': True, 'morning_news_use_llm': False, 'llm_api_key': 'faf81f2600e12b4', 'llm_api_base_url': 'http://8:3000/api/openapi/v1'}
[INFO][2023-07-05 14:42:41][tool.py:32] - [tool] inited
[INFO][2023-07-05 14:42:41][role.py:69] - [Role] inited
[INFO][2023-07-05 14:42:41][dungeon.py:56] - [Dungeon] inited
[INFO][2023-07-05 14:42:41][hello.py:23] - [Hello] inited
[INFO][2023-07-05 14:42:41][finish.py:23] - [Finish] inited
http://0.0.0.0:9898/
[INFO][2023-07-05 14:42:48][wechatcomapp_channel.py:147] - [wechatcom] receive params: <Storage {'timestamp': '1688568168', 'msg_signature': '958479fb84c4924cdc21ab1e89d8ff04e780bf45', 'nonce': '1688413835'}>
113.108.92.100:48304 - - [05/Jul/2023 14:42:48] "HTTP/1.1 POST /wxcomapp" - 200 OK
[INFO][2023-07-05 14:42:49][bridge.py:32] - create bot chatGPT for chat
[INFO][2023-07-05 14:42:49][chat_gpt_bot.py:49] - [CHATGPT] query=你好
[INFO][2023-07-05 14:42:51][wechatcomapp_channel.py:63] - [wechatcom] Do send text to dante.sun: [ERROR]
你好!有什么我可以帮助你解决的问题吗?
befantasy commented 1 year ago

接入fastgpt,同样问题。可能是api返回的不标准吧。

yinjianjie commented 1 year ago

接入fastgpt,需要修改哪些配置项呢

jsfnzhangwei commented 10 months ago

你好请问这个问题有解决办法了吗?

ceozero commented 10 months ago

image

等一手大佬。