diff --git a/docs/docs/configuration/genai.md b/docs/docs/configuration/genai.md index 2ee27f724..2ec9a6276 100644 --- a/docs/docs/configuration/genai.md +++ b/docs/docs/configuration/genai.md @@ -3,9 +3,13 @@ id: genai title: Generative AI --- -Generative AI can be used to automatically generate descriptive text based on the thumbnails of your tracked objects. This helps with [Semantic Search](/configuration/semantic_search) in Frigate to provide more context about your tracked objects. +Generative AI can be used to automatically generate descriptive text based on the thumbnails of your tracked objects. This helps with [Semantic Search](/configuration/semantic_search) in Frigate to provide more context about your tracked objects. Descriptions are accessed via the _Explore_ view in the Frigate UI by clicking on a tracked object's thumbnail. -Semantic Search must be enabled to use Generative AI. Descriptions are accessed via the _Explore_ view in the Frigate UI by clicking on a tracked object's thumbnail. +:::info + +Semantic Search must be enabled to use Generative AI. + +::: ## Configuration diff --git a/frigate/api/event.py b/frigate/api/event.py index ac414cdde..cf0ac26cc 100644 --- a/frigate/api/event.py +++ b/frigate/api/event.py @@ -996,9 +996,11 @@ def regenerate_description( status_code=404, ) + camera_config = request.app.frigate_config.cameras[event.camera] + if ( request.app.frigate_config.semantic_search.enabled - and request.app.frigate_config.genai.enabled + and camera_config.genai.enabled ): request.app.event_metadata_updater.publish((event.id, params.source)) diff --git a/frigate/genai/__init__.py b/frigate/genai/__init__.py index e2d509383..74fae9fea 100644 --- a/frigate/genai/__init__.py +++ b/frigate/genai/__init__.py @@ -54,11 +54,10 @@ class GenAIClient: def get_genai_client(genai_config: GenAIConfig) -> Optional[GenAIClient]: """Get the GenAI client.""" - if genai_config.enabled: - load_providers() - provider = PROVIDERS.get(genai_config.provider) - if provider: - return provider(genai_config) + load_providers() + provider = PROVIDERS.get(genai_config.provider) + if provider: + return provider(genai_config) return None diff --git a/web/src/components/overlay/detail/SearchDetailDialog.tsx b/web/src/components/overlay/detail/SearchDetailDialog.tsx index f158df329..f56074a52 100644 --- a/web/src/components/overlay/detail/SearchDetailDialog.tsx +++ b/web/src/components/overlay/detail/SearchDetailDialog.tsx @@ -477,7 +477,7 @@ function ObjectDetailsTab({ onChange={(e) => setDesc(e.target.value)} />