Reflect updated config structure

This commit is contained in:
leccelecce 2025-03-03 19:06:15 +00:00 committed by GitHub
parent 4921cc26af
commit e950adc0eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -239,10 +239,10 @@ class EmbeddingMaintainer(threading.Thread):
# check if we're configured to send an early request after a minimum number of frames received
# we don't check required zones here - probably should, but does that run the risk in this simple logic
# that the object doesn't get into the required zones until later in the event?
if self.genai_client is not None and camera_config.genai.send_after_frames:
if self.genai_client is not None and camera_config.genai.send_triggers.after_significant_updates:
if (
len(self.tracked_events[data["id"]])
== camera_config.genai.send_after_frames
== camera_config.genai.send_triggers.after_significant_updates
):
event: Event = Event.get(Event.id == data["id"])
@ -324,6 +324,7 @@ class EmbeddingMaintainer(threading.Thread):
# Run GenAI
if (
camera_config.genai.enabled
and camera_config.genai.send_triggers.event_end
and self.genai_client is not None
and (
not camera_config.genai.objects