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

附件或者图片能否使用base64实现 #215

Closed
a8851625 opened this issue Jun 24, 2024 · 13 comments
Closed

附件或者图片能否使用base64实现 #215

a8851625 opened this issue Jun 24, 2024 · 13 comments

Comments

@a8851625
Copy link

如题

少一个服务,部署起来也简单些

@Issues-translate-bot
Copy link

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


Title: Can attachments or pictures be implemented using base64?

As title

One less service and easier to deploy

@Sh1n3zZ
Copy link
Collaborator

Sh1n3zZ commented Jun 24, 2024

Hi,

chatnio-blob-service 项目附带支持 base64 的选项,不需要其他依赖、支持使用 vercel 进行一键部署
具体请查看 https://github.com/Deeptrain-Community/chatnio-blob-service/ 项目的 README.md

Regrads,
Junhai Deng

@AnnaStreeter
Copy link
Collaborator

提问题前建议看文档

@Issues-translate-bot
Copy link

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


It is recommended to read the documentation before asking questions

@a8851625
Copy link
Author

但是请求到到llm后端的时候是通过 chatnio-blob-service 配置的公网域名url;

我指的是直接到llm后端的时候 就是 base64。

@Issues-translate-bot
Copy link

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


But when the request reaches the llm backend, it is the public domain name URL configured through chatnio-blob-service;

What I mean is that when going directly to the llm backend, it is base64.

@Sh1n3zZ
Copy link
Collaborator

Sh1n3zZ commented Jun 24, 2024

Hi,

较为冗余,建议使用 vercel 一键快速部署。

Regards,
Junhai Deng

@Issues-translate-bot
Copy link

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


Hi,

It is relatively redundant. It is recommended to use vercel for one-click rapid deployment.

Regards,
Junhai Deng

@a8851625
Copy link
Author

好的,确实是支持,没看清楚;抱歉,不过内容貌似不全:

{"model":"qwen","messages":[{"role":"user","content":"hi"},{"role":"assistant","content":"Hi! How can I help you today? "},{"role":"user","content":"hi"},{"role":"assistant","content":"Hi! How can I assist you today?"},{"role":"user","content":"file\n[[20240618-104928.jpeg]]\ndata:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQA ...\n\n\n图片的内容是啥?"}],"max_tokens":2000,"stream":true,"presence_penalty":0,"frequency_penalty":0,"temperature":0.8,"top_p":1}

@Issues-translate-bot
Copy link

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


Okay, it is indeed supported, but I didn’t see it clearly; I’m sorry, but the content seems incomplete:

{"model":"qwen","messages":[{"role":"user","content":"hi"},{"role":"assistant","content":"Hi! How can I help you today? "},{"role":"user","content":"hi"},{"role":"assistant","content":"Hi! How can I assist you today?" },{"role":"user","content":"```file\n[[20240618-104928.jpeg]]\ndata:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQA ...\n` ``\n\nWhat is the content of the picture? "}],"max_tokens":2000,"stream":true,"presence_penalty":0,"frequency_penalty":0,"temperature":0.8,"top_p": 1}

@Sh1n3zZ
Copy link
Collaborator

Sh1n3zZ commented Jun 24, 2024

Hi,

你请求的模型 qwen 不支持图片识别,所以被自动省略了。
当模型不支持图片识别时,经过 base64 编码后的图片会被认为是文本,过长的文本(token)会导致过多的费用,所以采取判断省略用于防止出现该情况。

解决方案:使用支持图片识别的模型。如:gpt-4-vision gpt-4o

Regards,
Junhai Deng

@Issues-translate-bot
Copy link

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


Hi,

The model qwen you requested does not support image recognition, so it is automatically omitted.
When the model does not support image recognition, the base64-encoded image will be considered text. Too long text (token) will result in excessive costs, so judgment omission is used to prevent this situation.

Solution: Use a model that supports image recognition. Such as: gpt-4-vision gpt-4o etc.

Regards,
Junhai Deng

@zmh-program
Copy link
Member

zmh-program commented Jun 24, 2024

hey there, your model qwen is not a vision-ability common model, u can use the models mapping or try other models like gpt-4-turbo, claude-3-opus and so on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants