write prompts for genai at the camera level (#13767)

This commit is contained in:
Josh Hawkins
2024-09-16 09:46:11 -05:00
committed by GitHub
parent 06ccf7e9e9
commit e3edcf057c
5 changed files with 46 additions and 10 deletions

View File

@@ -171,8 +171,11 @@ class EmbeddingMaintainer(threading.Thread):
self, event: Event, thumbnails: list[bytes], metadata: dict
) -> None:
"""Embed the description for an event."""
camera_config = self.config.cameras[event.camera]
description = self.genai_client.generate_description(thumbnails, metadata)
description = self.genai_client.generate_description(
camera_config, thumbnails, metadata
)
if description is None:
logger.debug("Failed to generate description for %s", event.id)