babakcode / flutter_gemini

Flutter Google Gemini SDK
https://pub.dev/packages/flutter_gemini
BSD 3-Clause "New" or "Revised" License
176 stars 53 forks source link

Code examples don't work, neither demo app #30

Open aldozorzi opened 4 months ago

aldozorzi commented 4 months ago

I tried to cut and paste example code

` final gemini = Gemini.instance;

gemini
    .text("Write a story about a magic backpack.")
    .then((value) => print(value?.output))

    /// or value?.content?.parts?.last.text
    .catchError((e) => print(e));

`

and the response is

**GeminiException** => This exception was thrown because the response has a status code of 400 and RequestOptions.validateStatus was configured to throw for this status code.

So I tried other code examples, and none of them work. Then I tried demo app, and TADAAA, it doesn't work either. I guess there is something wrong :D

Edit: it seems to be related to my local region (Italy).

ryosoul commented 4 months ago

I'm having the same problem. Japan region.

zigbug commented 3 months ago

The same problem... Russia, Thailand

jasonofua commented 2 months ago

Please pull the latest code, the issue is from the model, Gemini pro is depreciated so it has been changed to Gemini flash