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

Gemini REST API implemented in NodeJs application works on localhost but fails in production #258

Open
petrong opened this issue Feb 14, 2024 · 4 comments
Labels
type:bug Something isn't working

Comments

@petrong
Copy link

petrong commented Feb 14, 2024

Description of the bug:

Gemini REST API implemented in NodeJs application works on localhost but fails in production. Returns 502 error seen below

Gemini endpoint used: https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=$API_KEY

Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request

Reason: Error reading from remote server

Error log in server Apache Ubuntu 20.04 gives

[proxy_http:error] [pid 756595] (70007)The timeout specified has expired: ....AH01102: error reading status line from remote server localhost:5001
[proxy:error] [pid 756595] ...AH00898: Error reading from remote server returned by /gig/geminize

Can I get any help to resolve this urgently please?

Thanks

Actual vs expected behavior:

No response

Any other information you'd like to share?

No response

@petrong petrong added the type:bug Something isn't working label Feb 14, 2024
@petrong
Copy link
Author

petrong commented Feb 14, 2024

So I attempted to send this API request to Gemini API via my server terminal..

like this:

sudo curl -X POST -H "Content-Type: application/json" -d '{"contents": [{
"parts":[{"text": "Write a story about the Christian faith."}]}]}' "https://generativelanguage.googleapis.com/v1beta/mod
els/gemini-pro:generateContent?key=API_KEY"

and here was the outcome:

{
  "error": {
    "code": 400,
    "message": "User location is not supported for the API use.",
    "status": "FAILED_PRECONDITION"
  }
}

My server location is England, so I asked Google Bard the below:

Is Gemini REST API supported in England?

The reponse:

As of today, February 14, 2024, the Gemini REST API is not currently supported in England.

  • Reason: Gemini temporarily disabled all API functionalities for UK customers on November 22nd, 2023 to comply with the UK Travel Rule.
  • Expected time frame: They are working to re-enable the API with compliant features and aim to resume service in January 2024. However, due to today's date, it seems that the service hasn't resumed yet.

Here are some helpful resources:

Since I am trained on a massive dataset of text and code, I can offer different information depending on how you phrase your questions. As such, let me know if you have any further questions or need clarification on a specific aspect of the Gemini API's availability in England.

I critically need this API to implement live chat for an urgent project. Does this Google Bard response mean the end of the road for me?

Any help would be appreciated.

@petrong
Copy link
Author

petrong commented Feb 14, 2024

https://ai.google.dev/available_regions

Is there any workaround for me? Though my server is situated in England, I am not. I am in Africa

@jeevanism
Copy link

geminapi It seems UK is out of the available regions list

@AmineAouragh
Copy link

That's sad. Are people from UK still can't get access as of now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants