基于大模型搭建的聊天机器人,同时支持 微信公众号、企业微信应用、飞书、钉钉 等接入,可选择GPT3.5/GPT-4o/GPT-o1/ Claude/文心一言/讯飞星火/通义千问/ Gemini/GLM-4/Claude/Kimi/LinkAI,能处理文本、语音和图片,访问操作系统和互联网,支持基于自有知识库进行定制企业智能客服。
31.61k
stars
8.22k
forks
source link
说我是无效的令牌,我用是的ONE API转的 #1846
Closed
cq134cq closed 4 months ago
前置确认
⚠️ 搜索issues中是否已存在类似问题
操作系统类型?
Docker
运行的python版本是?
python 3.7
使用的chatgpt-on-wechat版本是?
Latest Release
运行的
channel
类型是?wx(个人微信, itchat)
复现步骤 🕹
测试过很多次都这样问题
问题描述 😯
说我是无效的令牌,我用是的ONE API转的,我的配置如下 { "channel_type": "wx", "model": "gpt-3.5-turbo", "open_ai_api_key": "sk-Ig5Y2Lq1nluNvYZE81B4B1F11cA84d1eAb112eE4C826De94", "open_ai_api_base": "http://10.0.100.176:3002/v1", "text_to_image": "dall-e-2", "voice_to_text": "openai", "text_to_voice": "openai", "proxy": "", "hot_reload": false, "single_chat_prefix": [ "bot", "@bott" ], "single_chat_reply_prefix": "[bot] ", "group_chat_prefix": [ "@bot" ], "group_name_white_list": [ "ChatGPT测试群", "ChatGPT测试群2" ], "image_create_prefix": [ "画" ], "speech_recognition": true, "group_speech_recognition": false, "voice_reply_voice": false, "conversation_max_tokens": 2500, "expires_in_seconds": 3600, "character_desc": "你是ChatGPT, 一个由OpenAI训练的大型语言模型, 你旨在回答并解决人们的任何问题,并且可以使用多种语言与人交流。", "temperature": 0.7, "subscribe_msg": "感谢您的关注!\n这里是AI智能助手,可以自由对话。\n支持语音对话。\n支持图片输入。\n支持图片输出,画字开头的消息将按要求创作图片。\n支持tool、角色扮演和文字冒险等丰富的插件。\n输入{trigger_prefix}#help 查看详细指令。", "use_linkai": false, "linkai_api_key": "", "linkai_app_code": "" }
下面是日志 Start auto replying. [INFO][2024-03-27 05:23:04][wechat_channel.py:131] - Wechat login success, user_id: @3c0cf05af67caa94d66f922aa4a0a1df52ac8eea6562f9031f5b38aecae5cdb1, nickname: 马铃薯 [INFO][2024-03-27 05:23:16][bridge.py:51] - create bot chatGPT for chat [INFO][2024-03-27 05:23:16][chat_gpt_bot.py:49] - [CHATGPT] query=t 你好 [ERROR][2024-03-27 05:23:17][chat_gpt_bot.py:155] - [CHATGPT] Exception: 无效的令牌 (request id: 20240327132317779976580EU62z1pf) Traceback (most recent call last): File "/app/bot/chatgpt/chat_gpt_bot.py", line 123, in reply_text response = openai.ChatCompletion.create(api_key=api_key, messages=session.messages, *args) File "/usr/local/lib/python3.10/site-packages/openai/api_resources/chat_completion.py", line 25, in create return super().create(args, **kwargs) File "/usr/local/lib/python3.10/site-packages/openai/api_resources/abstract/engine_apiresource.py", line 153, in create response, , api_key = requestor.request( File "/usr/local/lib/python3.10/site-packages/openai/api_requestor.py", line 298, in request resp, got_stream = self._interpret_response(result, stream) File "/usr/local/lib/python3.10/site-packages/openai/api_requestor.py", line 700, in _interpret_response self._interpret_response_line( File "/usr/local/lib/python3.10/site-packages/openai/api_requestor.py", line 763, in _interpret_response_line raise self.handle_error_response( openai.error.AuthenticationError: 无效的令牌 (request id: 20240327132317779976580EU62z1pf) [INFO][2024-03-27 05:23:18][wechat_channel.py:217] - [WX] sendMsg=Reply(type=ERROR, content=[ERROR] 我现在有点累了,等会再来吧), receiver=@c739680fb8bd32d9f9cf0e95b6caf70a
终端日志 📒