You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While using the ChatGoogleGenerativeAI, my script sometimes crashes due to an internal server error: google.api_core.exceptions.InternalServerError: 500 Unable to submit request because the service is temporarily unavailable..
From the log messages, It seems that there is an internal retry mechanism in Google's package, as this appears before the crash: Retrying langchain_google_genai.chat_models._chat_with_retry.<locals>._chat_with_retry in 2.0 seconds as it raised InternalServerError: 500 Unable to submit request because the service is temporarily unavailable.., and often, the retry solves the error. However, I did not find a way to specify the number of retries, so it only retries once after 2 seconds.
In the ChatGoogleGenerativeAI constructor, it is possible to specify the max_retires parameter, but this is not passed to Google's package, so it does not work as expected in my case. Would it be possible to also include the google.api_core.exceptions.InternalServerError among the errors that cause a retry in your package (here)?
The text was updated successfully, but these errors were encountered:
While using the
ChatGoogleGenerativeAI
, my script sometimes crashes due to an internal server error:google.api_core.exceptions.InternalServerError: 500 Unable to submit request because the service is temporarily unavailable.
.From the log messages, It seems that there is an internal retry mechanism in Google's package, as this appears before the crash:
Retrying langchain_google_genai.chat_models._chat_with_retry.<locals>._chat_with_retry in 2.0 seconds as it raised InternalServerError: 500 Unable to submit request because the service is temporarily unavailable..
, and often, the retry solves the error. However, I did not find a way to specify the number of retries, so it only retries once after 2 seconds.In the
ChatGoogleGenerativeAI
constructor, it is possible to specify themax_retires
parameter, but this is not passed to Google's package, so it does not work as expected in my case. Would it be possible to also include thegoogle.api_core.exceptions.InternalServerError
among the errors that cause a retry in your package (here)?The text was updated successfully, but these errors were encountered: