Skip to content

Conversation

@xingxinag
Copy link

…_chat_reply_prefix", "") + reply_text + conf().get("single_chat_reply_suffix", "") 报错
[INFO][2025-01-04 13:23:10][google_gemini_bot.py:60] - [Gemini] reply=嘟嘟嘟! 😄 我现在准备接收你的指令了。你想让我做什么呢?
修复这个报错
chatgpt-on-wechat-20250104214403.log

[ERROR][2025-01-04 13:23:10][wechatmp_channel.py:301] - [wechatmp] Fail to generate reply to user, msgId=24853501756706936, 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 176, in _handle
reply = self._decorate_reply(context, reply)
File "/app/channel/chat_channel.py", line 261, in _decorate_reply
reply_text = conf().get("single_chat_reply_prefix", "") + reply_text + conf().get("single_chat_reply_suffix", "")

…_chat_reply_prefix", "") + reply_text + conf().get("single_chat_reply_suffix", "") 报错
https://gemini.meetcoding.cn/gemini_1.5.html
Gemini 1.5 Pro​
最佳的多模态模型,具有适用于各种推理任务的功能。中型多模态模型,可以一次处理大量数据,包括 2 小时的视频、19 小时的音频、6 万行代码的代码库或 2,000 页的文本。

输入音频、图片、视频和文本,获取文本回复
生成代码、提取数据、编辑文本等
适用于需要提升广告效果时
https://gemini.meetcoding.cn/gemini_1.5.html
Gemini 1.5 Pro​
最佳的多模态模型,具有适用于各种推理任务的功能。中型多模态模型,可以一次处理大量数据,包括 2 小时的视频、19 小时的音频、6 万行代码的代码库或 2,000 页的文本。

输入音频、图片、视频和文本,获取文本回复
生成代码、提取数据、编辑文本等
适用于需要提升广告效果时
@6vision
Copy link
Collaborator

6vision commented Jan 15, 2025

您好,有几个问题讨论一下:
1、针对公众号报错的这部分修改:这个报错和通道无关,是参数类型配置有误。如果把参数类型配置正确即不会报错,代码内直接把列表转为字符串的话可能会出现一些问题,比如用户配置了多个回复前缀,现在的修改逻辑就不是用户预期的结果,可以保持现有的逻辑不变
2、针对Gemini的优化修改,是否兼容之前的逻辑,有测试过嘛?
3、tool插件的修改是解决什么问题呀,另外代码中放置了key,不太合适,有可能误导用户哦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants