Closed ins13014778 closed 1 month ago
从你的日志来看你还是用的是openAI的模型,glm-4是智普的模型,大概率是你的config.json配置有误
GLM-4 日志[INFO][2024-03-28 21:23:00][chat_gpt_bot.py:49] - [CHATGPT] query=你好 [WARNING][2024-03-28 21:23:00][chat_gpt_session.py:85] - num_tokens_from_messages() is not implemented for model GLM-4. Returning num tokens assuming gpt-3.5-turbo. [ERROR][2024-03-28 21:23:00][chat_gpt_bot.py:155] - [CHATGPT] Exception: No API key provided. You can set your API key in code using 'openai.api_key =
', or you can set the environment variable OPENAI_API_KEY= ). If your API key is stored in a file, you can point the openai module at it with 'openai.api_key_path = '. You can generate API keys in the OpenAI web interface. See https://platform.openai.com/account/api-keys for details. Traceback (most recent call last): File "/root/chatgpt-on-wechat/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/python3/lib/python3.8/site-packages/openai/api_resources/chat_completion.py", line 25, in create return super().create(args, **kwargs) File "/usr/local/python3/lib/python3.8/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 149, in create ) = cls.__prepare_create_request( File "/usr/local/python3/lib/python3.8/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 106, in prepare_create_request requestor = api_requestor.APIRequestor( File "/usr/local/python3/lib/python3.8/site-packages/openai/api_requestor.py", line 138, in init__ self.api_key = key or util.default_api_key() File "/usr/local/python3/lib/python3.8/site-packages/openai/util.py", line 186, in default_api_key raise openai.error.AuthenticationError( openai.error.AuthenticationError: No API key provided. You can set your API key in code using 'openai.api_key = ', or you can set the environment variable OPENAI_API_KEY= ). If your API key is stored in a file, you can point the openai module at it with 'openai.api_key_path = '. You can generate API keys in the OpenAI web interface. See https://platform.openai.com/account/api-keys for details. [INFO][2024-03-28 21:23:01][wechat_channel.py:217] - [WX] sendMsg=Reply(type=ERROR, content=[ERROR] 我现在有点累了,等会再来吧), receiver=@2429f13a3cc362616bf0c36c4d167a85086f1e8b32ed175a70178a5520fcb1c0 配置 { "model": "GLM-4", "single_chat_prefix": [""], "expires_in_seconds": 3600, "group_chat_prefix": ["@Ai"], "group_chat_reply_prefix": "Ai", "group_chat_reply_suffix": "", "group_name_white_list": ["河南艺术职业学院群", "ChatGPT测试群2"], "group_welcome_msg": "", "conversation_max_tokens": 4000, "zhipu_ai_api_key": "fastgpt-mE8GutOrDmkYNFhGgnV9Y70afAYvaXA3ogpm6OlL19XMOtiD8R6xnBH0", "zhipu_ai_api_base": "https://77.100661.xyz/api/v1" }
chatgpt-on-wechat | [INFO][2024-03-27 19:20:46][bridge.py:54] - create bot chatGPT for chat chatgpt-on-wechat | [INFO][2024-03-27 19:20:46][chat_gpt_bot.py:49]
这看上去还是ChatGPT。
前置确认
⚠️ 搜索issues中是否已存在类似问题
操作系统类型?
Linux
运行的python版本是?
python 3.10
使用的chatgpt-on-wechat版本是?
Latest Release
运行的
channel
类型是?wx(个人微信, itchat)
复现步骤 🕹
[ERROR] 请再问我一次 [ERROR] 我现在有点累了,等会再来吧
问题描述 😯
No response
终端日志 📒