Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

用fastgpt的api接入一直显示这个错误 #2274

Closed
2 tasks done
mess-in-a-dress opened this issue Aug 28, 2024 · 7 comments
Closed
2 tasks done

用fastgpt的api接入一直显示这个错误 #2274

mess-in-a-dress opened this issue Aug 28, 2024 · 7 comments

Comments

@mess-in-a-dress
Copy link

mess-in-a-dress commented Aug 28, 2024

前置确认

  • 我确认我运行的是最新版本的代码,并且安装了所需的依赖,在FAQS中也未找到类似问题。

⚠️ 搜索issues中是否已存在类似问题

  • 我已经搜索过issues和disscussions,没有跟我遇到的问题相关的issue

操作系统类型?

Windows

运行的python版本是?

python 3.8

使用的chatgpt-on-wechat版本是?

Latest Release

运行的channel类型是?

wx(个人微信, itchat)

复现步骤 🕹

{
"channel_type": "wx",
"model": "gpt-3.5-turbo",
"open_ai_api_key": "",
"open_ai_api_base": "",
"text_to_image": "dall-e-2",
"voice_to_text": "openai",
"text_to_voice": "openai",
"proxy": "",
"hot_reload": false,
"single_chat_prefix": [
"bot",
"@bot"
],
"single_chat_reply_prefix": "[bot] ",
"group_chat_prefix": [
"@bot"
],
"group_name_white_list": [
"ChatGPT测试群",
"ChatGPT测试群2"
],
"image_create_prefix": [
"画"
],
"speech_recognition": true,
"group_speech_recognition": false,
"voice_reply_voice": false,
"conversation_max_tokens": 2500,
"expires_in_seconds": 3600,
"character_desc": "你是基于大语言模型的AI智能助手,旨在回答并解决人们的任何问题,并且可以使用多种语言与人交流。",
"temperature": 0.7,
"subscribe_msg": "感谢您的关注!\n这里是AI智能助手,可以自由对话。\n支持语音对话。\n支持图片输入。\n支持图片输出,画字开头的消息将按要求创作图片。\n支持tool、角色扮演和文字冒险等丰富的插件。\n输入{trigger_prefix}#help 查看详细指令。",
"use_linkai": false,
"linkai_api_key": "",
"linkai_app_code": ""
}

问题描述 😯

应该不是配置参数的格式问题,但还是一直显示下面这个错误:
[ERROR][2024-08-28 18:11:59][chat_channel.py:303] - Worker return exception: can only concatenate str (not "list") to str
Traceback (most recent call last):
File "D:\Anaconda\lib\concurrent\futures\thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "D:\fast-gpt\2\chatgpt-on-wechat-master\channel\chat_channel.py", line 176, in _handle
reply = self._decorate_reply(context, reply)
File "D:\fast-gpt\2\chatgpt-on-wechat-master\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", "")
TypeError: can only concatenate str (not "list") to str

终端日志 📒

<此处粘贴终端日志>
@Linnnkkk
Copy link

一样的,格式对不上了,有解决方法了吗?

@KingfuZhang
Copy link

fastgpt应用里有个“插件调用”,取消调用的插件就可以了。是FastGPT的问题

@SDAIer
Copy link

SDAIer commented Aug 29, 2024

fastgpt应用里有个“插件调用”,取消调用的插件就可以了。是FastGPT的问题

插件调用在哪?没找到,也没启用啊

@SDAIer
Copy link

SDAIer commented Aug 29, 2024

一堆人在问这个问题,就是每个解决方案

@KingfuZhang
Copy link

fastgpt应用里有个“插件调用”,取消调用的插件就可以了。是FastGPT的问题

插件调用在哪?没找到,也没启用啊

我早上也出现了这个问题,我把应用重新删除了再挂上知识库重新生成key就好了,你试试

@Linnnkkk
Copy link

fastgpt应用里有个“插件调用”,取消调用的插件就可以了。是FastGPT的问题

插件调用在哪?没找到,也没启用啊

我早上也出现了这个问题,我把应用重新删除了再挂上知识库重新生成key就好了,你试试

我删了工作流,重新建一个,只有ai会话,还是有这种问题

@6vision
Copy link
Collaborator

6vision commented Sep 3, 2024

检查reply_text 是不是返回了列表,一般来说都是需要返回字符串

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

No branches or pull requests

6 participants
@6vision @mess-in-a-dress @Linnnkkk @KingfuZhang @SDAIer and others