Open
Description
Description of the bug:
Getting this error sometimes. What does it mean? If I rerun the script, it is not raised every time, but only sometimes.
REQUEST_TIMEOUT = 90
# model is `gemini-1.5-flash`
client = genai.GenerativeModel(model, system_instruction=system_instruction)
google_completion = await asyncio.wait_for(
client.generate_content_async(
messages,
safety_settings={
HarmCategory.HARM_CATEGORY_HARASSMENT: HarmBlockThreshold.BLOCK_NONE,
HarmCategory.HARM_CATEGORY_HATE_SPEECH: HarmBlockThreshold.BLOCK_NONE,
HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT: HarmBlockThreshold.BLOCK_NONE,
HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT: HarmBlockThreshold.BLOCK_NONE,
},
),
REQUEST_TIMEOUT,
)
Actual vs expected behavior:
Actual:
TypeError Could not create `Blob`, expected `Blob`, `dict` or an `Image` type(`PIL.Image.Image` or `IPython.display.Image`).
Got a: <class 'NoneType'>
Value: None
Expected there to be no error
Any other information you'd like to share?
No response