Hk-Gosuto / ChatGPT-Next-Web-LangChain

一键拥有你自己的 ChatGPT 网页服务。 One-Click to deploy your own ChatGPT web UI.(基于 langchain 实现的插件版本 Plugin version implemented based on langchain)
https://n3xt.chat
MIT License
1.15k stars 386 forks source link

[Bug] 上传图片报错{ "error": true, "message": "[object Object]" } #301

Closed simulacraliasing closed 2 months ago

simulacraliasing commented 2 months ago

📦 部署方式

Docker

📌 软件版本

2.12.4

💻 系统环境

Other Linux

📌 系统版本

Debian12.5

🌐 浏览器

Chrome

📌 浏览器版本

-

🐛 问题描述

使用最新的代码构建的docker镜像上传图片会报错: chatgpt-next-web | Additional message: Unable to coerce message from array: only human, AI, or system message coercion is currently supported. chatgpt-next-web | at p.formatMessages (/app/.next/server/app/api/langchain/tool/agent/nodejs/route.js:48:63526) chatgpt-next-web | at T.formatMessages (/app/.next/server/app/api/langchain/tool/agent/nodejs/route.js:54:3272) chatgpt-next-web | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) chatgpt-next-web | at async T.formatPromptValue (/app/.next/server/app/api/langchain/tool/agent/nodejs/route.js:52:519) chatgpt-next-web | at async T._callWithConfig (/app/.next/server/chunks/724.js:28:3298) chatgpt-next-web | at async T._streamIterator (/app/.next/server/chunks/724.js:28:2388) chatgpt-next-web | at async T.transform (/app/.next/server/chunks/724.js:28:5215) chatgpt-next-web | at async r1.transform (/app/.next/server/chunks/724.js:28:5179) chatgpt-next-web | at async j.transform (/app/.next/server/chunks/724.js:31:4794) chatgpt-next-web | at async eU.transform (/app/.next/server/chunks/724.js:28:5179) writer error chatgpt-next-web | [handleChainError] Error [InputFormatError]: Field "input" in prompt uses a MessagesPlaceholder, which expects an array of BaseMessages or coerceable values as input.

📷 复现步骤

No response

🚦 期望结果

No response

📝 补充信息

No response

simulacraliasing commented 2 months ago

回退到a20c57b之后问题不存在了,初步判断是a20c57b之后的提交造成的

Issues-translate-bot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically.


After rolling back to a20c57b0e852560284f063305ca0dd0143c29d63, the problem no longer exists. It is initially determined that it is caused by the submission after a20c57b0e852560284f063305ca0dd0143c29d63.