Hi, I wanted retries to happen if my call to the Gemini API failed and so I added HttpRetryOptions as below:
_gemini_client = genai.Client(
api_key=os.getenv("GEMINI_API_KEY"),
http_options=types.HttpOptions(
timeout=int(GEMINI_VERIFICATION_TIMEOUT_SECONDS * 1000),
retry_options=types.HttpRetryOptions(
attempts=3,
initial_delay=1.0,
max_delay=5.0,
exp_base=2.0,
jitter=0.3,
http_status_codes=[408, 429, 500, 502, 503, 504]
)
)
)
But I keep getting an error like:
Error: module 'google.genai.types' has no attribute 'HttpRetryOptions'
I check the Gemini python SDK and it says it has these retry options so not sure why I get this error. I looked at the docs:
