Catch GoogleAPICallError in Google Generative AI (#119118)

This commit is contained in:
tronikos 2024-06-07 23:51:42 -07:00 committed by Franck Nijhof
parent 34477d3559
commit 0f8ed4e73d
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3

View File

@ -71,7 +71,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
try:
response = await model.generate_content_async(prompt_parts)
except (
ClientError,
GoogleAPICallError,
ValueError,
genai_types.BlockedPromptException,
genai_types.StopCandidateException,