Remove environment from prompt

This commit is contained in:
Nicolas Mowen 2025-08-12 16:18:01 -06:00
parent 6ad4edd502
commit 9949f9c6e6
3 changed files with 8 additions and 6 deletions

View File

@ -22,6 +22,4 @@ class GenAIConfig(FrigateBaseModel):
api_key: Optional[EnvString] = Field(default=None, title="Provider API key.") api_key: Optional[EnvString] = Field(default=None, title="Provider API key.")
base_url: Optional[str] = Field(default=None, title="Provider base url.") base_url: Optional[str] = Field(default=None, title="Provider base url.")
model: str = Field(default="gpt-4o", title="GenAI model.") model: str = Field(default="gpt-4o", title="GenAI model.")
provider: GenAIProviderEnum | None = Field( provider: GenAIProviderEnum | None = Field(default=None, title="GenAI provider.")
default=None, title="GenAI provider."
)

View File

@ -39,7 +39,9 @@ class PostProcessorApi(ABC):
pass pass
@abstractmethod @abstractmethod
def handle_request(self, topic: str, request_data: dict[str, Any]) -> dict[str, Any] | None: def handle_request(
self, topic: str, request_data: dict[str, Any]
) -> dict[str, Any] | None:
"""Handle metadata requests. """Handle metadata requests.
Args: Args:
request_data (dict): containing data about requested change to process. request_data (dict): containing data about requested change to process.

View File

@ -72,7 +72,7 @@ Your task is to provide a clear, security-focused description of the scene that:
Facts come first, but identifying security risks is the primary goal. Facts come first, but identifying security risks is the primary goal.
When forming your description: When forming your description:
- Describe the time, physical setting, people, and objects exactly as seen. Include any observable environmental changes (e.g., lighting changes triggered by activity). - Describe the time, people, and objects exactly as seen. Include any observable environmental changes (e.g., lighting changes triggered by activity).
- Time of day should **increase suspicion only when paired with unusual or security-relevant behaviors**. Do not raise the threat level for common residential activities (e.g., residents walking pets, retrieving mail, gardening, playing with pets, supervising children) even at unusual hours, unless other suspicious indicators are present. - Time of day should **increase suspicion only when paired with unusual or security-relevant behaviors**. Do not raise the threat level for common residential activities (e.g., residents walking pets, retrieving mail, gardening, playing with pets, supervising children) even at unusual hours, unless other suspicious indicators are present.
- Focus on behaviors that are uncharacteristic of innocent activity: loitering without clear purpose, avoiding cameras, inspecting vehicles/doors, changing behavior when lights activate, scanning surroundings without an apparent benign reason. - Focus on behaviors that are uncharacteristic of innocent activity: loitering without clear purpose, avoiding cameras, inspecting vehicles/doors, changing behavior when lights activate, scanning surroundings without an apparent benign reason.
- **Benign context override**: If scanning or looking around is clearly part of an innocent activity (such as playing with a dog, gardening, supervising children, or watching for a pet), do not treat it as suspicious. - **Benign context override**: If scanning or looking around is clearly part of an innocent activity (such as playing with a dog, gardening, supervising children, or watching for a pet), do not treat it as suspicious.
@ -105,7 +105,9 @@ Sequence details:
if debug_save: if debug_save:
with open( with open(
os.path.join(CLIPS_DIR, "genai-requests", review_data["id"], "prompt.txt"), os.path.join(
CLIPS_DIR, "genai-requests", review_data["id"], "prompt.txt"
),
"w", "w",
) as f: ) as f:
f.write(context_prompt) f.write(context_prompt)