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] 在 Gemini 2.0 Flash Exp 生图失败时最好显示一个错误 #6963

Closed
breakstring opened this issue Mar 14, 2025 · 17 comments
Closed
Labels
🐛 Bug Something isn't working | 缺陷 Gemini

Comments

@breakstring
Copy link

📦 部署环境

Docker

📦 部署模式

服务端模式(lobe-chat-database 镜像)

📌 软件版本

v1.71.0

💻 系统环境

macOS

🌐 浏览器

Other

🐛 问题描述

Gemini 2.0 Flash Exp 在生图的时候,如果出现错误,最好显示一个提示?
否则现在啥都不显示,会怪怪的不知道出现了啥问题。
例如:

Image

在 AI Studio 里面至少会有一个错误提示:

Image

📷 复现步骤

No response

🚦 期望结果

No response

📝 补充信息

No response

@breakstring breakstring added the 🐛 Bug Something isn't working | 缺陷 label Mar 14, 2025
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Mar 14, 2025
@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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@lobehubbot
Copy link
Member

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


📦 Deployment environment

Docker

📦 Deployment mode

Server-side mode (lobe-chat-database mirror)

📌 Software version

v1.71.0

💻 System environment

macOS

🌐 Browser

Other

🐛 Question description

Gemini 2.0 Flash Exp If an error occurs when the raw picture is used, it is best to display a prompt?
Otherwise, if nothing is displayed now, it will be strange and I don’t know what the problem has occurred.
For example:

Image

There will be at least one error message in AI Studio:

Image

📷 Reproduction steps

No response

🚦 Expected results

No response

📝 Supplementary information

No response

@dosubot dosubot bot added the Gemini label Mar 14, 2025
Copy link

dosubot bot commented Mar 14, 2025

目前在 Gemini 2.0 Flash Exp 模块中,似乎没有明确的错误处理机制或用户界面组件来显示错误消息[1]。为了改善用户体验,建议在代码中添加错误处理逻辑,并在用户界面上显示相应的错误提示。这可以通过在图像生成失败时捕获异常,并使用现有的 UI 组件显示错误消息来实现。这样可以帮助用户更好地理解问题所在,并采取相应的措施。

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@arvinxx
Copy link
Contributor

arvinxx commented Mar 14, 2025

有服务端报错吗?主要是现在好像没有相关的状态返回

@lobehubbot
Copy link
Member

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


Is there an error on the server side? It seems that there is no relevant status now

@SAnBlog
Copy link

SAnBlog commented Mar 15, 2025

奇怪,我试了几次图片上传或者要求图文并茂,都没有官网的效果,修图出现上述报错无回复,图文并茂无图.

@lobehubbot
Copy link
Member

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


Strangely, I tried uploading pictures several times or requesting pictures and texts, but there was no effect on the official website. There was no reply to the above error when editing pictures, and there was no picture and text.

@arvinxx
Copy link
Contributor

arvinxx commented Mar 15, 2025

我试了下这个图:

Image

开启 Debug 模式(DEBUG_GOOGLE_CHAT_COMPLETION=1)下可以看到返回的流中没有任何图,也没有任何关于拦截原因的显示

[stream start] 2025-3-15 11:7:22.523
[chunk 0] 2025-3-15 11:7:22.526
{"candidates":[{"content":{"parts":[{"text":""}],"role":"model"},"finishReason":"STOP"}],"usageMetadata":{"promptTokenCount":1327,"totalTokenCount":1327,"promptTokensDetails":[{"modality":"TEXT","tokenCount":37},{"modality":"IMAGE","tokenCount":1290}]},"modelVersion":"gemini-2.0-flash-exp-image-generation"}

[stream finished] total chunks: 1

因此我感觉是这个模型本身的输出不太稳定的关系,或者官方还没来及给接口添加安全拦截的返回。

@arvinxx arvinxx closed this as completed Mar 15, 2025
@github-project-automation github-project-automation bot moved this from Roadmap - Chat 1.x to Done in Lobe Chat Routine Mar 15, 2025
@lobehubbot
Copy link
Member

@breakstring

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

@git268
Copy link

git268 commented Mar 15, 2025

试了好几次就没成功过,跟你一样没有任何输出报错

@lobehubbot
Copy link
Member

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


I tried several times and didn't succeed. Like you, there was no error in the output.

@bbbugg
Copy link
Contributor

bbbugg commented Mar 15, 2025

官方网站使用是有错误信息的

@lobehubbot
Copy link
Member

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


There is an error message when using the official website

@arvinxx
Copy link
Contributor

arvinxx commented Mar 15, 2025

@bbbugg 能不能给一个有错误信息的输入我测测看?

@lobehubbot
Copy link
Member

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


@bbbugg Can I give an input with error message and I can check it?

@bbbugg
Copy link
Contributor

bbbugg commented Mar 15, 2025

@bbbugg 能不能给一个有错误信息的输入我测测看?

点开那个报错警告就能看见了

Image

Image

@lobehubbot
Copy link
Member

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


@bbbugg Can I give an input with error message and I can check it?

Click on the error warning to see it

Image

Image

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

No branches or pull requests

6 participants