mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-02 09:02:15 +03:00
Migrate object genai configuration (#19437)
* Move genAI object to objects section * Adjust config propogation behavior * Refactor genai config usage * Automatic migration * Always start the embeddings process * Always init embeddings * Config fixes * Adjust reference config * Adjust docs * Formatting * Fix
This commit is contained in:
committed by
Blake Blackshear
parent
7c1681e344
commit
1f3755e45d
+3
-26
@@ -246,18 +246,7 @@ class FrigateApp:
|
||||
logger.info(f"Review process started: {review_segment_process.pid}")
|
||||
|
||||
def init_embeddings_manager(self) -> None:
|
||||
genai_cameras = [
|
||||
c for c in self.config.cameras.values() if c.enabled and c.genai.enabled
|
||||
]
|
||||
|
||||
if (
|
||||
not self.config.semantic_search.enabled
|
||||
and not genai_cameras
|
||||
and not self.config.lpr.enabled
|
||||
and not self.config.face_recognition.enabled
|
||||
):
|
||||
return
|
||||
|
||||
# always start the embeddings process
|
||||
embedding_process = EmbeddingProcess(
|
||||
self.config, self.embeddings_metrics, self.stop_event
|
||||
)
|
||||
@@ -309,20 +298,8 @@ class FrigateApp:
|
||||
migrate_exports(self.config.ffmpeg, list(self.config.cameras.keys()))
|
||||
|
||||
def init_embeddings_client(self) -> None:
|
||||
genai_cameras = [
|
||||
c
|
||||
for c in self.config.cameras.values()
|
||||
if c.enabled_in_config and c.genai.enabled
|
||||
]
|
||||
|
||||
if (
|
||||
self.config.semantic_search.enabled
|
||||
or self.config.lpr.enabled
|
||||
or genai_cameras
|
||||
or self.config.face_recognition.enabled
|
||||
):
|
||||
# Create a client for other processes to use
|
||||
self.embeddings = EmbeddingsContext(self.db)
|
||||
# Create a client for other processes to use
|
||||
self.embeddings = EmbeddingsContext(self.db)
|
||||
|
||||
def init_inter_process_communicator(self) -> None:
|
||||
self.inter_process_communicator = InterProcessCommunicator()
|
||||
|
||||
Reference in New Issue
Block a user