gunpal5 / Google_GenerativeAI

Unofficial C# Google Generative AI SDK (Google Gemini) with function calls support
MIT License
33 stars 3 forks source link

Fails on first code example #7

Open Brandon689 opened 2 months ago

Brandon689 commented 2 months ago

Unhandled exception. GenerativeAI.Exceptions.GenerativeAIException: Error while requesting https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=__API_Key__:

{ "error": { "code": 400, "message": "Request contains an invalid argument.", "status": "INVALID_ARGUMENT" } }

gunpal5 commented 1 month ago

can you share input of your request?

P.S. I've released an update, please test v1.0.2.

jerrevds commented 1 month ago

I encountered a similar issue; not that the free version of gemini is not usable in the EU with a status code 400 But you need to dig deep in the debug values to find the exact error message in the body

gunpal5 commented 1 month ago

@jerrevds which version are you using? Please try again with latest version 1.0.2

if problem persists then please share the input prompt.