From ca38705ea5f04bd6e9a18f3d6449a8c891f06db1 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Fri, 8 Aug 2025 21:12:46 -0600 Subject: [PATCH] Prompt changes --- frigate/data_processing/post/types.py | 6 +++--- frigate/genai/__init__.py | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/frigate/data_processing/post/types.py b/frigate/data_processing/post/types.py index 9ce63e419..cae50d80c 100644 --- a/frigate/data_processing/post/types.py +++ b/frigate/data_processing/post/types.py @@ -3,10 +3,10 @@ from pydantic import BaseModel, Field class ReviewMetadata(BaseModel): scene: str = Field( - description="A concise summary of the overall scene. This should be a single string of text." + description="A comprehensive description of the setting and entities, including relevant context and plausible inferences if supported by visual evidence." ) - action: str = Field( - description="A concise description of the primary action or event happening in the scene. This should be a single string of text." + confidence: float = Field( + description="A float between 0 and 1 representing your overall confidence in this analysis." ) potential_threat_level: int | None = Field( default=None, diff --git a/frigate/genai/__init__.py b/frigate/genai/__init__.py index 0d3f75a40..7fd1e3ef2 100644 --- a/frigate/genai/__init__.py +++ b/frigate/genai/__init__.py @@ -56,9 +56,8 @@ class GenAIClient: Your response **MUST** be a flat JSON object with the following fields: - `scene` (string): A comprehensive description of the setting and entities, including relevant context and plausible inferences if supported by visual evidence. - - `action` (string): A concise description of the main action(s) or movement(s) taking place. - - `potential_threat_level` (integer, optional): 0–3 scale. Only include if a clear security concern is visible: - - 0 = No concern + - `confidence` (float): A float between 0 and 1 representing your overall confidence in this analysis. + - `potential_threat_level` (integer, optional): 1–3 scale. Only include if a clear security concern is visible: - 1 = Unusual but not overtly threatening - 2 = Suspicious or potentially harmful - 3 = Clear and immediate threat