google / generative-ai-docs

Documentation for Google's Gen AI site - including the Gemini API and Gemma
https://ai.google.dev
Apache License 2.0
1.47k stars 503 forks source link

API request return a 500 Server Error frequently #270

Open SarahOssama opened 4 months ago

SarahOssama commented 4 months ago

this is what i get and i checked and made sure that my key is in the env variables

Traceback (most recent call last): File "C:\Users\sosman\AppData\Local\Programs\Python\Python311\Lib\site-packages\spacy_llm\models\rest\palm\model.py", line 64, in _request r.raise_for_status() File "C:\Users\sosman\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://generativelanguage.googleapis.com/v1beta3/models/text-bison-001:generateText?key=AIzaSyB2CE2CyMvaa_LPbboyk09rZgTEkmoZoTk

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "e:\Projects\IV&VTesting\Attempts\Variable Classification\NERSpacy\demo.py", line 41, in NER() File "e:\Projects\IV&VTesting\Attempts\Variable Classification\NERSpacy\demo.py", line 31, in NER doc = nlp(text) ^^^^^^^^^ File "C:\Users\sosman\AppData\Local\Programs\Python\Python311\Lib\site-packages\spacy\language.py", line 1054, in call error_handler(name, proc, [doc], e) File "C:\Users\sosman\AppData\Local\Programs\Python\Python311\Lib\site-packages\spacy\util.py", line 1704, in raise_error raise e File "C:\Users\sosman\AppData\Local\Programs\Python\Python311\Lib\site-packages\spacy\language.py", line 1049, in call doc = proc(doc, **component_cfg.get(name, {})) # type: ignore[call-arg] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sosman\AppData\Local\Programs\Python\Python311\Lib\site-packages\spacy_llm\pipeline\llm.py", line 161, in call docs = self._process_docs([doc]) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sosman\AppData\Local\Programs\Python\Python311\Lib\site-packages\spacy_llm\pipeline\llm.py", line 215, in _process_docs responses_iters = tee(self._model(prompts_iters[0]), n_iters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sosman\AppData\Local\Programs\Python\Python311\Lib\site-packages\spacy_llm\models\rest\palm\model.py", line 87, in call responses = [ ^ File "C:\Users\sosman\AppData\Local\Programs\Python\Python311\Lib\site-packages\spacy_llm\models\rest\palm\model.py", line 88, in _request( File "C:\Users\sosman\AppData\Local\Programs\Python\Python311\Lib\site-packages\spacy_llm\models\rest\palm\model.py", line 70, in _request raise ValueError(f"Request to PaLM API failed: {error_message}") from ex ValueError: Request to PaLM API failed: An internal error has occurred. Please retry or report in https://developers.generativeai.google/guide/troubleshooting

ShayKaiserman commented 4 months ago

It happened to me too right now. I used the API before and it was never a problem..

SarahOssama commented 4 months ago

Yes it works a min and then goes down again

jun0wanan commented 4 months ago

Yes it works a min and then goes down again

I also have this problem ....

Who can help us ?

Halhawasi commented 2 months ago

I also have this problem