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

目前出了新模型了,项目是否已经支持啦?需要更改config么? #1247

Open dwd923 opened 1 year ago

dwd923 commented 1 year ago

⚠️ 搜索是否存在类似issue

总结

No response

举例

No response

动机

No response

lanvent commented 1 year ago

修改配置中的model就能使用,如果要使用16k model,conversation_max_tokens 需要配合修改大一点

dwd923 commented 1 year ago

修改配置中的model就能使用,如果要使用16k model,conversation_max_tokens 需要配合修改大一点

修改成gpt-3.5-turbo-16k-0613是不是就可以?

lanvent commented 1 year ago
dwd923 commented 1 year ago

get√,谢大佬

GesiIvy128 commented 1 year ago

我将model改为"gpt-3.5-turbo-0613"提问后却报错: [INFO][2023-06-17 10:55:28][chat_gpt_bot.py:49] - [CHATGPT] query=你在吗 [WARNING][2023-06-17 10:55:30][chat_gpt_session.py:77] - num_tokens_from_messages() is not implemented for model gpt-3.5-turbo-0613. Returning num tokens assuming gpt-3.5-turbo-0301. [WARNING][2023-06-17 10:55:31][chat_gpt_session.py:77] - num_tokens_from_messages() is not implemented for model gpt-3.5-turbo-0613. Returning num tokens assuming gpt-3.5-turbo-0301. [ERROR][2023-06-17 10:55:31][chat_channel.py:270] - Worker return exception: can only concatenate list (not "str") to list Traceback (most recent call last): File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/app/channel/chat_channel.py", line 150, in _handle reply = self._decorate_reply(context, reply) File "/app/channel/chat_channel.py", line 228, in _decorate_reply reply_text = conf().get("single_chat_reply_prefix", "") + reply_text TypeError: can only concatenate list (not "str") to list

我是用railway部署的

chenjin0827 commented 1 year ago

一样的问题,解决了吗

shxch commented 1 year ago

相同的问题,我觉得应该把单聊prefix去掉,应该没人会在单聊的时候还加个前缀吧

[INFO][2023-07-12 18:17:23][chat_gpt_bot.py:49] - [CHATGPT] query=hi [ERROR][2023-07-12 18:17:26][chat_channel.py:270] - Worker return exception: can only concatenate list (not "str") to list Traceback (most recent call last): File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/app/channel/chat_channel.py", line 150, in _handle reply = self._decorate_reply(context, reply) File "/app/channel/chat_channel.py", line 228, in _decorate_reply reply_text = conf().get("single_chat_reply_prefix", "") + reply_text + conf().get("single_chat_reply_suffix", "") TypeError: can only concatenate list (not "str") to list

GesiIvy128 commented 1 year ago

我觉得从逻辑角度 不该去掉单聊的prefix, 因为你的小号可能加了其他人,你总不会希望随便一个什么人问你小号问题,你的小号都化身bot吧

相同的问题,我觉得应该把单聊prefix去掉,应该没人会在单聊的时候还加个前缀吧

[INFO][2023-07-12 18:17:23][chat_gpt_bot.py:49] - [CHATGPT] query=hi [ERROR][2023-07-12 18:17:26][chat_channel.py:270] - Worker return exception: can only concatenate list (not "str") to list Traceback (most recent call last): File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/app/channel/chat_channel.py", line 150, in _handle reply = self._decorate_reply(context, reply) File "/app/channel/chat_channel.py", line 228, in _decorate_reply reply_text = conf().get("single_chat_reply_prefix", "") + reply_text + conf().get("single_chat_reply_suffix", "") TypeError: can only concatenate list (not "str") to list

shxch commented 1 year ago

有道理诶,是我考虑不周了

hellosmarter commented 1 year ago

@lanvent 修改配置中的model修改成了gpt-4-0613,运行是提示下面这个告警,这个应该不影响使用gpt4模型吧,只是说这个token计算不准是吧? 另外最新的代码有没有把这个警告fix掉了,因为我用的还是比较之前旧一点的代码,谢谢 [WARNING][2023-07-31 00:12:48][chat_gpt_session.py:76] - num_tokens_from_messages() is not implemented for model gpt-4-0613. Returning num tokens assuming gpt-3.5-turbo-0301.