forked from Github/frigate
Add ability to restrict genai to objects and zones at the camera level (#13958)
* Add ability to restrict genai to labels and zones at the camera level * fix comment * clarify docs * use objects instead of labels * docs * object list
This commit is contained in:
@@ -127,6 +127,14 @@ class EmbeddingMaintainer(threading.Thread):
|
||||
camera_config.genai.enabled
|
||||
and self.genai_client is not None
|
||||
and event.data.get("description") is None
|
||||
and (
|
||||
camera_config.genai.objects is None
|
||||
or event.label in camera_config.genai.objects
|
||||
)
|
||||
and (
|
||||
camera_config.genai.required_zones is None
|
||||
or set(event.zones) & set(camera_config.genai.required_zones)
|
||||
)
|
||||
):
|
||||
# Generate the description. Call happens in a thread since it is network bound.
|
||||
threading.Thread(
|
||||
|
||||
Reference in New Issue
Block a user