generative-ai-docs icon indicating copy to clipboard operation
generative-ai-docs copied to clipboard

API request return a 500 Server Error frequently

Open SarahOssama opened this issue 1 year ago • 6 comments

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

SarahOssama avatar Feb 22 '24 07:02 SarahOssama

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

ShayKaiserman avatar Feb 22 '24 08:02 ShayKaiserman

Yes it works a min and then goes down again

SarahOssama avatar Feb 22 '24 09:02 SarahOssama

Yes it works a min and then goes down again

I also have this problem ....

Who can help us ?

jun0wanan avatar Feb 29 '24 08:02 jun0wanan

I also have this problem

Halhawasi avatar May 08 '24 13:05 Halhawasi

Also have the same problem with latest gemini-1.5-pro

danpe avatar Oct 17 '24 12:10 danpe