lobe-chat
lobe-chat copied to clipboard
[Bug] iOS 用 gpt-4-vision 发送图片报错 413
💻 系统环境
iOS
📦 部署环境
Official Preview
🌐 浏览器
Chrome
🐛 问题描述
refs: #668
有人反馈还是有问题,网上搜了一下,似乎不只是图片分辨率或者大小造成的
https://community.openai.com/t/error-sending-image-to-openai-apierror-413-the-data-value-transmitted-exceeds-the-capacity-limit/469279
https://community.openai.com/t/bug-error-413-the-data-value-transmitted-exceeds-the-capacity-limit-when-calling-v1-images-edits/464513
🚦 期望结果
No response
📷 复现步骤
No response
📝 补充信息
No response
👀 @mushan0x0
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。
ios 用 Gemini Pro Vision 随便相机拍张图,也会提示超大小
{
"error": {
"message": "[GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1/models/gemini-pro-vision:streamGenerateContent?alt=sse: [400 Bad Request] Request payload size exceeds the limit: 4194304 bytes."
},
"provider": "google"
}
mac os 上倒是同样的图又正常了,看了下代码没找到那里的原因
https://github.com/lobehub/lobe-chat/blob/main/src/utils/compressImage.ts
这个压缩图片的代码 ios 和 mac os 测了下也没问题
尝试找了下我这边的问题应该是老版本的 bug
https://github.com/lobehub/lobe-chat/blob/v0.129.5/src/services/file.ts#L37
v0.129.5 版本 ios 上图片压缩的代码 image/jpeg 转 image/webp 文件反而会变大
最新版本沿用 file.type 应该正常了
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
I tried to find out that the problem on my side should be a bug in the old version.
https://github.com/lobehub/lobe-chat/blob/v0.129.5/src/services/file.ts#L37
v0.129.5 version of image compression code on ios, image/jpeg to image/webp file will become larger instead
The latest version should continue to use file.type and it should be normal.
@mushan0x0 看下是不是最新版本已经修复了?我的手机测了下好像没问题
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
@mushan0x0 Check to see if the latest version has been fixed? I tested it on my mobile phone and it seems to be fine.
没有出现过了
✅ @mushan0x0
This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Never appeared again