Closed sssssSleep closed 3 months ago
我也遇到了,把config.json里的模型api key从open_ai_api_key改成moonshot_api_key解决这个问题了
我也遇到了,把config.json里的模型api key从open_ai_api_key改成moonshot_api_key解决这个问题了
感谢您的帮助,我已成功运行,谢谢!
我也遇到了,把config.json里的模型api key从open_ai_api_key改成moonshot_api_key解决这个问题了
是要删除 openai的配置才行吗?我的默认就走 openapi
前置确认
⚠️ 搜索issues中是否已存在类似问题
操作系统类型?
Linux
运行的python版本是?
python 3.8
使用的chatgpt-on-wechat版本是?
Master (branch)
运行的
channel
类型是?wx(个人微信, itchat)
复现步骤 🕹
按照完依赖后,复制默认配置文件,修改如下值 "model": "moonshot-v1-8k", "open_ai_api_key": "my api", "open_ai_api_base": "https://api.moonshot.cn/v1", 其余不变
问题描述 😯
报错如图
终端日志 📒
[ERROR][2024-06-07 01:43:32][moonshot_bot.py:137] - can only concatenate str (not "NoneType") to str Traceback (most recent call last): File "/home/lhq/chatgpt-on-wechat/bot/moonshot/moonshot_bot.py", line 93, in reply_text "Authorization": "Bearer " + self.api_key TypeError: can only concatenate str (not "NoneType") to str [ERROR][2024-06-07 01:43:32][moonshot_bot.py:137] - can only concatenate str (not "NoneType") to str Traceback (most recent call last): File "/home/lhq/chatgpt-on-wechat/bot/moonshot/moonshot_bot.py", line 93, in reply_text "Authorization": "Bearer " + self.api_key TypeError: can only concatenate str (not "NoneType") to str
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/lhq/chatgpt-on-wechat/bot/moonshot/moonshot_bot.py", line 93, in reply_text "Authorization": "Bearer " + self.api_key TypeError: can only concatenate str (not "NoneType") to str [ERROR][2024-06-07 01:43:32][moonshot_bot.py:137] - can only concatenate str (not "NoneType") to str Traceback (most recent call last): File "/home/lhq/chatgpt-on-wechat/bot/moonshot/moonshot_bot.py", line 93, in reply_text "Authorization": "Bearer " + self.api_key TypeError: can only concatenate str (not "NoneType") to str
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/lhq/chatgpt-on-wechat/bot/moonshot/moonshot_bot.py", line 93, in reply_text "Authorization": "Bearer " + self.api_key TypeError: can only concatenate str (not "NoneType") to str
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/lhq/chatgpt-on-wechat/bot/moonshot/moonshot_bot.py", line 93, in reply_text "Authorization": "Bearer " + self.api_key