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

[Bug] Claude 3.5 在图片的内容分析上有问题 #3001

Closed
breakstring opened this issue Jun 23, 2024 · 28 comments · Fixed by #3870
Closed

[Bug] Claude 3.5 在图片的内容分析上有问题 #3001

breakstring opened this issue Jun 23, 2024 · 28 comments · Fixed by #3870
Labels
🐛 Bug Something isn't working | 缺陷 released

Comments

@breakstring
Copy link

📦 Environment

Vercel

📌 Version

1.1.6

💻 Operating System

macOS

🌐 Browser

Other

🐛 Bug Description

无法使用 Claude 3.5 解析图片内容,OpenAI 则没问题。

📷 Recurrence Steps

  1. 选择模型为 Claude 3.5,插入图片到聊天窗口中,输入 prompt 请求解析。
  2. 报错提示如下:
    、、、
    {
    "error": {
    "error": {
    "type": "error",
    "error": {
    "type": "invalid_request_error",
    "message": "messages.0.content.1.image.source.base64.media_type: Input should be 'image/jpeg', 'image/png', 'image/gif' or 'image/webp'"
    }
    },
    "status": 400,
    "headers": {
    "via": "1.1 google",
    "date": "Sun, 23 Jun 2024 23:28:03 GMT",
    "connection": "keep-alive",
    "request-id": "req_01BhNKq3EqhyioScf16uDPm5",
    "content-type": "application/json",
    "content-length": "193",
    "x-should-retry": "false",
    "x-cloud-trace-context": "b8d7344e29c2adb51dfd7c01eb5a9e9f"
    }
    },
    "endpoint": "https://api.anthropic.com",
    "provider": "anthropic"
    }
    、、、
    image

🚦 Expected Behavior

  1. 返回解析的内容

📝 Additional Information

No response

@breakstring breakstring added the 🐛 Bug Something isn't working | 缺陷 label Jun 23, 2024
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Jun 23, 2024
@lobehubbot
Copy link
Member

👀 @breakstring

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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@arvinxx
Copy link
Contributor

arvinxx commented Jun 24, 2024

看报错应该是 Anthropic 的api不支持base64 的图片,必须要可访问的 url 才能识别。你配置下s3应该就好了

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


The error message seems to be that Anthropic's API does not support base64 images, and an accessible URL is required to identify them. It should be fine if you configure s3

@breakstring
Copy link
Author

看报错应该是 Anthropic 的api不支持base64 的图片,必须要可访问的 url 才能识别。你配置下s3应该就好了

我是采用的服务端数据库存储方案,目前是华为云兼容 S3 的 OBS。
BTW: 请求 OpenAI 正常。

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Judging from the error report, it should be that Anthropic's API does not support base64 images, and an accessible URL is required to identify them. It should be fine if you configure s3

The server-side database storage solution I use is currently OBS compatible with Huawei Cloud's S3.
BTW: Requesting OpenAI works fine.

@arvinxx
Copy link
Contributor

arvinxx commented Jun 24, 2024

那估计是个 bug,我晚点看看

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


That's probably a bug, I'll check it out later

@breakstring
Copy link
Author

那估计是个 bug,我晚点看看

Any update?

@arvinxx
Copy link
Contributor

arvinxx commented Jul 9, 2024

https://docs.anthropic.com/en/docs/build-with-claude/vision#can-claude-read-image-urls 查阅了下官方文档, Claude API 目前不支持传入 url 来识别,如果要使用必须要传输 base64。这么看和 Google 的 Gemini 问题一样,可能还是得用 base64 传输

@hominsu
Copy link

hominsu commented Aug 2, 2024

any update?

@huangyafei
Copy link

确实是个影响挺大的问题,请问有什么进展了么?

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


It is indeed an issue with a huge impact. Is there any progress?

@arvinxx
Copy link
Contributor

arvinxx commented Aug 2, 2024

Here is the PR to fix similar issue: #3370

@wxy-skye
Copy link

The problem still persists. The server-side mode cannot use Claude for image recognition. It can only use GPT.

@breakstring
Copy link
Author

The problem still persists. The server-side mode cannot use Claude for image recognition. It can only use GPT.
Yes, the PR #3370 still in progress...

@hlc1209
Copy link

hlc1209 commented Aug 31, 2024

+1,严重影响日常使用

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


+1, seriously affects daily use

@adminewacc
Copy link

me too, pls fix that

@RetrainIt
Copy link

+1,严重影响日常使用

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


+1, seriously affects daily use

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I have received your letter, thank you.

@2019YKL
Copy link

2019YKL commented Sep 4, 2024

S3有办法本地的那个S3么,我识图目前还没成功过(
CleanShot 2024-09-04 at 17 54 26@2x

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Is there any way to localize S3 to S3? I haven’t been able to successfully read images yet (
CleanShot 2024-09-04 at 17 54 26@2x

@Stardust-SJF
Copy link

I wonder if it is possible to use base64 to directly upload images to the model provider instead of uploading images into the knowledge database, or convert the image to base64 after retrieving it from S3 storage and then encode (to base 64) and send them to model providers?

@adminewacc
Copy link

I wonder if it is possible to use base64 to directly upload images to the model provider instead of uploading images into the knowledge database, or convert the image to base64 after retrieving it from S3 storage and then encode (to base 64) and send them to model providers?

i solved it

@adminewacc
Copy link

S3有办法本地的那个S3么,我识图目前还没成功过( CleanShot 2024-09-04 at 17 54 26@2x

in this case i think that it is showing this error because of your api key quota

@github-project-automation github-project-automation bot moved this from Roadmap - Chat 1.x to Done in Lobe Chat Routine Sep 9, 2024
@lobehubbot
Copy link
Member

@breakstring

This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。

@lobehubbot
Copy link
Member

🎉 This issue has been resolved in version 1.15.30 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷 released
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.