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

Request body is too large #1758

Closed
6 of 7 tasks
lin-z-z opened this issue Jun 13, 2024 · 0 comments
Closed
6 of 7 tasks

Request body is too large #1758

lin-z-z opened this issue Jun 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@lin-z-z
Copy link

lin-z-z commented Jun 13, 2024

例行检查

  • 我已确认目前没有类似 issue
  • 我已完整查看过项目 README,以及项目文档
  • 我使用了自己的 key,并确认我的 key 是可正常使用的
  • 我理解并愿意跟进此 issue,协助测试和提供反馈
  • 我理解并认可上述内容,并理解项目维护者精力有限,不遵循规则的 issue 可能会被无视或直接关闭

你的版本

  • 公有云版本
  • 私有部署版本, 具体版本号: 4.8.4

问题描述, 日志截图
这是我的流程:
image
这是出现的问题:
image

复现步骤
我是打算把AI对话中的图片传给代码执行节点,然后获取图片的base64编码,打印出来,这时候代码执行节点就出现了以下的报错:

本次测试图片大小:3.01 MB,报错如下:

{
  "message": "Request body is too large",
  "data": {
    "success": false,
    "time": "2024-06-13T14:16:14.339Z",
    "message": "Request body is too large"
  },
  "name": "AxiosError",
  "method": "post",
  "code": "ERR_BAD_RESPONSE"
}

代码执行节点的自定义的输入如下:

{
  "text": [
    {
      "obj": "System",
      "value": [
        {
          "type": "text",
          "text": {
            "content": "描述下用户输入的的图片"
          }
        }
      ]
    },
    {
      "obj": "Human",
      "value": [
        {
          "type": "file",
          "file": {
            "type": "image",
            "name": "",
            "url": "data:image/png;base64,iVBORw******"}
        }
      ]
    },
    {
      "obj": "AI",
      "value": [
        {
          "type": "text",
          "text": {
            "content": "这张图片是一个由三个不同场景组成的拼图。每个场景都描绘了中国古典风格的元素。\n\n左上角的场景展示了一个宁静的河流,河上有几只小船,船上的人们穿着传统服饰。河两岸是具有古典建筑风格的房屋,有着曲折的屋顶和精致的木制结构。背景中有一座拱形桥横跨河流,远处的山丘在薄雾中若隐若现。\n\n右上角的场景是一个室外的休息区,一位男子坐在长凳上,旁边是一张桌子上放着茶具。他正仰望着天空,一片树叶正飘落在他的方向。这个场景同样展现了古典建筑的细节,如雕刻精美的窗棂和挂在墙上的中国结。\n\n中间的图像是一个精美的中国瓷器,蓝白色的花瓶上绘有复杂的花卉图案。瓷器的设计和图案体现了中国传统的工艺美术。\n\n下方的场景是一位穿着传统服饰的女子,她的头饰精致,面容温婉。她正静静地坐着,手中拿着一朵白色的莲花,旁边是一尊佛像和一杯茶。整个场景给人一种宁静和内省的感觉。\n\n整体而言,这张图片通过其精美的细节和和谐的色彩,展现了中国古典文化的美学和生活方式。"
          }
        }
      ]
    }
  ]
}

可以看到输入中已经有图片的base64了,但是代码执行节点会出现这个报错:Request body is too large。

JS代码如下:

function main({text}){
    for(let i = 0;i< text.length; i++){
    const obj = text[i];
	if(obj.obj === "Human"){
		const values = obj.value;
		for (let j = 0; j< values.length; j++){
			const value = values[j];
			if(value.type === "file"){
				return {
					result:value.file.url
					}
			}
		}
	}
}
}

如果图片大小为:136k,则不会报错,
image

预期结果
希望每个节点都能接受一定大小的图片,例如10M以内,目前测试效果来看是只有几百k的图片可以传入到别的节点

@lin-z-z lin-z-z added the bug Something isn't working label Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants