Closed AdvaitKale01 closed 4 days ago
@AdvaitKale01 Did you find a solution for this?
@AdvaitKale01 Did you find a solution for this?
Sadly no. I am trying to troubleshoot by my side as well. @babakcode this seems to be a critical issue with text with images section.
@AdvaitKale01 Did you find a solution for this?
Sadly no. I am trying to troubleshoot by my side as well. @babakcode this seems to be a critical issue with text with images section.
kindly tag me when you find one. @AdvaitKale01
i got the same issue, still stuck here :(
@vincentkims49 So it turns out the package needs to be updated as the gemini 1.0 pro model is marked depricated by Google
And hence its API request has been removed.
Simple solution is to add a parameter to include the newer model of your choice.
await gemini.textAndImage(
modelName: "models/gemini-1.5-flash",
....
Like @AdvaitKale01 said it is to fork the library and change to modelName: "models/gemini-1.5-flash",
, i was stuck on it for long until i finally changed it
@babakcode PR for this fix https://github.com/babakcode/flutter_gemini/pull/35
Hi everyone, @jasonofua @AdvaitKale01 👋,
I also have the same problem with the error when using image and text generation 🖼️📝.
After debugging and finding the cause, I have the same opinion about needing to replace "gemini-pro-vision"
with "gemini-1.5-flash"
🔄.
Regarding patch #35, I applied it and it works very well 👍.
I leave this comment to summarize and confirm for all other developers experiencing the same error and to provide the solution here 🔍💡.
Thanks, everyone 🙏.
Error details- Error sending text and image: GeminiException => This exception was thrown because the response has a status code of 404 and RequestOptions.validateStatus was configured to throw for this status code.
The status code of 404 has the following meaning: "Client error - the request contains bad syntax or cannot be fulfilled"
Read more about status codes at https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
In order to resolve this exception you typically have either to verify and fix your request code or you have to fix the server code.
Status Code: -1