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.71k stars 623 forks source link

Gemini AI API error #261

Open shreyadilip opened 9 months ago

shreyadilip commented 9 months ago

The following error keeps coming up when I tried hosting a yt video summarising app on streamlit using the gemini api. could you help me resolve it? InternalServerError: 500 An internal error has occurred. Please retry or report in https://developers.generativeai.google/guide/troubleshooting Traceback: File "C:\Users\shrey\AppData\Local\Programs\Python\Python311\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 535, in _run_script exec(code, module.dict) File "C:\Users\shrey\VidVoyager\app.py", line 55, in summary = generate_gemini_content(transcript_text, prompt) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\shrey\VidVoyager\app.py", line 35, in generate_gemini_content response = model.generate_content(prompt + transcript_text) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\shrey\AppData\Local\Programs\Python\Python311\Lib\site-packages\google\generativeai\generative_models.py", line 248, in generate_content response = self._client.generate_content(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\shrey\AppData\Local\Programs\Python\Python311\Lib\site-packages\google\ai\generativelanguage_v1beta\services\generative_service\client.py", line 566, in generate_content response = rpc( ^^^^ File "C:\Users\shrey\AppData\Local\Programs\Python\Python311\Lib\site-packages\google\api_core\gapic_v1\method.py", line 131, in call return wrapped_func(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\shrey\AppData\Local\Programs\Python\Python311\Lib\site-packages\google\api_core\retry\retry_unary.py", line 293, in retry_wrapped_func return retry_target( ^^^^^^^^^^^^^ File "C:\Users\shrey\AppData\Local\Programs\Python\Python311\Lib\site-packages\google\api_core\retry\retry_unary.py", line 153, in retry_target _retry_error_helper( File "C:\Users\shrey\AppData\Local\Programs\Python\Python311\Lib\site-packages\google\api_core\retry\retry_base.py", line 212, in _retry_error_helper raise final_exc from source_exc File "C:\Users\shrey\AppData\Local\Programs\Python\Python311\Lib\site-packages\google\api_core\retry\retry_unary.py", line 144, in retry_target result = target() ^^^^^^^^ File "C:\Users\shrey\AppData\Local\Programs\Python\Python311\Lib\site-packages\google\api_core\timeout.py", line 120, in func_with_timeout return func(args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\shrey\AppData\Local\Programs\Python\Python311\Lib\site-packages\google\api_core\grpc_helpers.py", line 78, in error_remapped_callable raise exceptions.from_grpc_error(exc) from exc

isnolan commented 8 months ago

+1