Closed ilyesksr closed 5 months ago
my add image function is working fine: if (_selectedImage != null) { final model = GenerativeModel( model: 'gemini-pro-vision', apiKey:"your api key", );
final imageBytes = await _selectedImage!.readAsBytes();
final content = Content.multi([
TextPart("your message"),
DataPart('image/jpeg', imageBytes),
]);
final response = await model.generateContent([content]);
This looks like a backend error unrelated to the SDK. Hopefully this was transient, but if this is still happening the best place to get help is at the https://developers.generativeai.google/guide/troubleshooting link form the error message.
Description of the bug:
hello guy pls can some one help me when i use google generative ai package with gemini-1.5-flash model with text only the app work normally but when i try to add an image as an entry i get this error An internal error has occurred. Please retry or report in https://developers.generativeai.google/guide/troubleshooting error sdk/lib/_internal/js_dev_runtime/private/ddcruntime/errors.dart 296:3 throw packages/google_generative_ai/src/api.dart 583:54 parseGenerateContentResponse here is the code :
Actual vs expected behavior:
it supposed to work on both text only and text with image but currently it work with text only
Any other information you'd like to share?
No response