-
Notifications
You must be signed in to change notification settings - Fork 109
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
报错:GenerateContentRequest.contents: contents is not specified #733
Comments
啥模型?这报错看起来不是OpenAI的,像是转的Gemini |
用newapi转的,在其他项目上使用这设定也可以正常对话 |
是不是开工具调用了?这里应该是转的时候的问题 gemini不接受空的content,但他有时候就会返回空的content,不处理直接加入history会报这个错。结束对话、关工具都试试。 |
能关都关了,工具是指谷歌代码执行吗?也关了.一样报错 |
请确保提出问题前更新到最新版本!!!!!!!!
请在提交issue前确认你已阅读了以下资料:
如果你的问题已经在readme或其他Issue中得到解答,我们很可能不会回复。请确保你的问题是一个新的问题。
问题描述
使用api模式聊天中出现这个错误,同样的设定切换到gemini模式就可以正常对话
环境
docker
miaozai-yunzai
最新插件
附加信息
Error: ChatGPT error 400: {"error":{"message":"* GenerateContentRequest.contents: contents is not specified\n (request id: 20241222170551151283082KDL6L8hQ)","type":"","param":"","code":400}}
at new ChatGPTError (file:///app/Miao-Yunzai/plugins/chatgpt-plugin/utils/openai/types.js:19:42)
at file:///app/Miao-Yunzai/plugins/chatgpt-plugin/utils/openai/fetch-sse.js:86:29
at step (file:///app/Miao-Yunzai/plugins/chatgpt-plugin/utils/openai/fetch-sse.js:32:23)
at Object.next (file:///app/Miao-Yunzai/plugins/chatgpt-plugin/utils/openai/fetch-sse.js:13:53)
at fulfilled (file:///app/Miao-Yunzai/plugins/chatgpt-plugin/utils/openai/fetch-sse.js:4:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
statusCode: 400,
statusText: 'Bad Request',
[cause]: Response {
�
size: 0,
[Symbol(Body internals)]: {
body: [PassThrough],
stream: [PassThrough],
boundary: null,
disturbed: true,
error: null
},
[Symbol(Response internals)]: {
type: 'default',
url: 'https://api.loxingyu.top/v1/chat/completions',
status: 400,
statusText: 'Bad Request',
headers: [Object],
counter: 0,
highWaterMark: 16384
}
}
}
[MiaoYz][17:05:51.379][ERRO] Error: Error: ChatGPT error 400: {"error":{"message":"* GenerateContentRequest.contents: contents is not specified\n (request id: 20241222170551151283082KDL6L8hQ)","type":"","param":"","code":400}}
at chatgpt.sendMessage (file:///app/Miao-Yunzai/plugins/chatgpt-plugin/model/core.js:978:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async chatgpt.abstractChat (file:///app/Miao-Yunzai/plugins/chatgpt-plugin/apps/chat.js:746:25)
at async chatgpt (file:///app/Miao-Yunzai/plugins/chatgpt-plugin/apps/chat.js:555:5)
at async PluginsLoader.deal (file:///app/Miao-Yunzai/lib/plugins/loader.js:275:41)
The text was updated successfully, but these errors were encountered: