Catch GoogleAPICallError in Google Generative AI (#119118)
parent
e4be3d8435
commit
5fdfafd57f
|
@ -71,7 +71,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||||
try:
|
try:
|
||||||
response = await model.generate_content_async(prompt_parts)
|
response = await model.generate_content_async(prompt_parts)
|
||||||
except (
|
except (
|
||||||
ClientError,
|
GoogleAPICallError,
|
||||||
ValueError,
|
ValueError,
|
||||||
genai_types.BlockedPromptException,
|
genai_types.BlockedPromptException,
|
||||||
genai_types.StopCandidateException,
|
genai_types.StopCandidateException,
|
||||||
|
|
Loading…
Reference in New Issue