This commit is contained in:
Nicolas Mowen 2026-02-14 15:54:20 -07:00
parent 56a1a0f5e3
commit c870ebea37
3 changed files with 9 additions and 7 deletions

View File

@ -145,7 +145,6 @@ class EmbeddingMaintainer(threading.Thread):
self.detected_license_plates: dict[str, dict[str, Any]] = {} self.detected_license_plates: dict[str, dict[str, Any]] = {}
self.genai_manager = GenAIClientManager(config) self.genai_manager = GenAIClientManager(config)
self.genai_client = self.genai_manager.vision_client
# model runners to share between realtime and post processors # model runners to share between realtime and post processors
if self.config.lpr.enabled: if self.config.lpr.enabled:
@ -204,12 +203,15 @@ class EmbeddingMaintainer(threading.Thread):
# post processors # post processors
self.post_processors: list[PostProcessorApi] = [] self.post_processors: list[PostProcessorApi] = []
if self.genai_client is not None and any( if self.genai_manager.vision_client is not None and any(
c.review.genai.enabled_in_config for c in self.config.cameras.values() c.review.genai.enabled_in_config for c in self.config.cameras.values()
): ):
self.post_processors.append( self.post_processors.append(
ReviewDescriptionProcessor( ReviewDescriptionProcessor(
self.config, self.requestor, self.metrics, self.genai_client self.config,
self.requestor,
self.metrics,
self.genai_manager.vision_client,
) )
) )
@ -247,7 +249,7 @@ class EmbeddingMaintainer(threading.Thread):
) )
self.post_processors.append(semantic_trigger_processor) self.post_processors.append(semantic_trigger_processor)
if self.genai_client is not None and any( if self.genai_manager.vision_client is not None and any(
c.objects.genai.enabled_in_config for c in self.config.cameras.values() c.objects.genai.enabled_in_config for c in self.config.cameras.values()
): ):
self.post_processors.append( self.post_processors.append(
@ -256,7 +258,7 @@ class EmbeddingMaintainer(threading.Thread):
self.embeddings, self.embeddings,
self.requestor, self.requestor,
self.metrics, self.metrics,
self.genai_client, self.genai_manager.vision_client,
semantic_trigger_processor, semantic_trigger_processor,
) )
) )