From a0197dce52eb8b3e148eb33159bfa6bbd10ac38e Mon Sep 17 00:00:00 2001 From: Jason Hunter Date: Wed, 12 Jun 2024 20:56:23 -0400 Subject: [PATCH] better error handling when genai fails --- frigate/embeddings/maintainer.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frigate/embeddings/maintainer.py b/frigate/embeddings/maintainer.py index 934e16654..c4adaddba 100644 --- a/frigate/embeddings/maintainer.py +++ b/frigate/embeddings/maintainer.py @@ -157,6 +157,10 @@ class EmbeddingMaintainer(threading.Thread): description = self.genai_client.generate_description(thumbnails, metadata) + if description is None: + logger.debug("Failed to generate description for %s", event.id) + return + # Update the event to add the description event.data["description"] = description event.save()