Closed vanish1984 closed 1 week ago
Docker
python 3.10
Latest Release
channel
wx(个人微信, itchat)
接入微信,后台接入fastgpt,调用 工具(知识库搜索)或(http模块),后台报错,无返回
2024-07-05T09:46:40.297031505Z [ERROR][2024-07-05 09:46:40][chat_channel.py:303] - Worker return exception: 'list' object has no attribute 'strip' 2024-07-05T09:46:40.297093838Z Traceback (most recent call last): 2024-07-05T09:46:40.297098880Z File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run 2024-07-05T09:46:40.297100671Z result = self.fn(*self.args, **self.kwargs) 2024-07-05T09:46:40.297102213Z File "/app/channel/chat_channel.py", line 176, in _handle 2024-07-05T09:46:40.297103630Z reply = self._decorate_reply(context, reply) 2024-07-05T09:46:40.297104921Z File "/app/channel/chat_channel.py", line 258, in _decorate_reply 2024-07-05T09:46:40.297106630Z reply_text = "@" + context["msg"].actual_user_nickname + "\n" + reply_text.strip() 2024-07-05T09:46:40.297108338Z AttributeError: 'list' object has no attribute 'strip'
模型使用 GPT4,并使用了 toolChoice 和 functionCall 特性
reply_text 正常时字符串类型,返回的时列表所以报错
使用了 toolChoice 特性,返回的可能是一个 数组,也符合 gpt的规范,是否有计划支持?
前置确认
⚠️ 搜索issues中是否已存在类似问题
操作系统类型?
Docker
运行的python版本是?
python 3.10
使用的chatgpt-on-wechat版本是?
Latest Release
运行的
channel
类型是?wx(个人微信, itchat)
复现步骤 🕹
接入微信,后台接入fastgpt,调用 工具(知识库搜索)或(http模块),后台报错,无返回
问题描述 😯
终端日志 📒