NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
Miscellaneous fixes (#23000)
Josh Hawkins1a1994ca1785
diff --git a/frigate/data_processing/post/types.py b/frigate/data_processing/post/types.pyindex 10390112da..02d27ccced 100644--- a/frigate/data_processing/post/types.py+++ b/frigate/data_processing/post/types.py@@ -8,8 +8,6 @@ class ReviewMetadata(BaseModel):description="A short title characterizing what took place and where, under 10 words.")scene: str = Field(- min_length=120,- max_length=600,description="A chronological narrative of what happens from start to finish.",)shortSummary: str = Field(diff --git a/frigate/genai/__init__.py b/frigate/genai/__init__.pyindex d95dd2cae2..a38f10de53 100644--- a/frigate/genai/__init__.py+++ b/frigate/genai/__init__.py@@ -151,6 +151,18 @@ Each line represents a detection state, not necessarily unique individuals. Theif "other_concerns" in schema.get("required", []):schema["required"].remove("other_concerns")+ # Length hints injected into the schema as suggestions to the model+ # (enforced by grammar-based providers like llama.cpp) but kept off the+ # Pydantic model so a non-compliant response does not fail validation.+ length_hints = {+ "scene": {"minLength": 120, "maxLength": 600},+ "shortSummary": {"minLength": 70, "maxLength": 100},+ }+ for field, hints in length_hints.items():+ prop = schema.get("properties", {}).get(field)+ if prop is not None:+ prop.update(hints)+# OpenAI strict mode requires additionalProperties: false on all objectsschema["additionalProperties"] = Falsediff --git a/web/public/locales/en/common.json b/web/public/locales/en/common.jsonindex de17f444b5..8b86b69d42 100644--- a/web/public/locales/en/common.json+++ b/web/public/locales/en/common.json@@ -257,6 +257,7 @@"export": "Export","actions": "Actions","uiPlayground": "UI Playground",+ "features": "Features","faceLibrary": "Face Library","classification": "Classification","chat": "Chat",diff --git a/web/src/components/card/AnimatedEventCard.tsx b/web/src/components/card/AnimatedEventCard.tsxindex 53a5481036..1b7b11f3d7 100644--- a/web/src/components/card/AnimatedEventCard.tsx+++ b/web/src/components/card/AnimatedEventCard.tsx@@ -161,13 +161,13 @@ export function AnimatedEventCard({<TooltipTrigger asChild><ButtonclassName={cn(- "absolute left-2 top-1 z-40 transition-opacity",+ "absolute left-2 top-1 z-40 bg-gray-500 bg-gradient-to-br from-gray-400 to-gray-500 transition-opacity",threatLevel === ThreatLevel.SECURITY_CONCERN &&- "pointer-events-auto bg-severity_alert opacity-100 hover:bg-severity_alert",+ "pointer-events-auto opacity-100",threatLevel === ThreatLevel.NEEDS_REVIEW &&- "pointer-events-auto bg-severity_detection opacity-100 hover:bg-severity_detection",+ "pointer-events-auto opacity-100",threatLevel === ThreatLevel.NORMAL &&- "pointer-events-none bg-gray-500 bg-gradient-to-br from-gray-400 to-gray-500 opacity-0 group-hover:pointer-events-auto group-hover:opacity-100",+ "pointer-events-none opacity-0 group-hover:pointer-events-auto group-hover:opacity-100",)}size="xs"aria-label={t("markAsReviewed")}diff --git a/web/src/components/classification/ClassificationModelWizardDialog.tsx b/web/src/components/classification/ClassificationModelWizardDialog.tsxindex 0c43b99425..d9b3b64e9b 100644--- a/web/src/components/classification/ClassificationModelWizardDialog.tsx+++ b/web/src/components/classification/ClassificationModelWizardDialog.tsx@@ -14,7 +14,6 @@ import Step3ChooseExamples, {Step3FormData,} from "./wizard/Step3ChooseExamples";import { cn } from "@/lib/utils";-import { isDesktop } from "react-device-detect";import axios from "axios";const OBJECT_STEPS = [@@ -153,13 +152,9 @@ export default function ClassificationModelWizardDialog({><DialogContentclassName={cn(- "",- isDesktop &&- wizardState.currentStep == 0 &&- "max-h-[90%] overflow-y-auto xl:max-h-[80%]",- isDesktop &&- wizardState.currentStep > 0 &&- "max-h-[90%] max-w-[70%] overflow-y-auto xl:max-h-[80%]",+ "scrollbar-container max-h-[90%] overflow-y-auto",+ wizardState.currentStep == 0 && "xl:max-h-[80%]",+ wizardState.currentStep > 0 && "md:max-w-[70%] xl:max-h-[80%]",)}onInteractOutside={(e) => {e.preventDefault();diff --git a/web/src/components/menu/GeneralSettings.tsx b/web/src/components/menu/GeneralSettings.tsxindex a84cd0aa25..d1a1322ac1 100644--- a/web/src/components/menu/GeneralSettings.tsx+++ b/web/src/components/menu/GeneralSettings.tsx@@ -6,6 +6,7 @@ import {LuLifeBuoy,LuList,LuLogOut,+ LuMessageSquare,LuMoon,LuSquarePen,LuScanFace,@@ -482,21 +483,25 @@ export default function GeneralSettings({ className }: GeneralSettingsProps) {</Link></>)}- {isAdmin && isMobile && config?.face_recognition.enabled && (- <>- <Link to="/faces">- <MenuItem- className="flex w-full items-center p-2 text-sm"- aria-label={t("menu.faceLibrary")}- >- <LuScanFace className="mr-2 size-4" />- <span>{t("menu.faceLibrary")}</span>- </MenuItem>- </Link>- </>- )}- {isAdmin && isMobile && (- <>+ </DropdownMenuGroup>+ {isMobile && isAdmin && (+ <>+ <DropdownMenuLabel className="mt-1">+ {t("menu.features")}+ </DropdownMenuLabel>+ <DropdownMenuSeparator />+ <DropdownMenuGroup className="flex flex-col">+ {config?.face_recognition.enabled && (+ <Link to="/faces">+ <MenuItem+ className="flex w-full items-center p-2 text-sm"+ aria-label={t("menu.faceLibrary")}+ >+ <LuScanFace className="mr-2 size-4" />+ <span>{t("menu.faceLibrary")}</span>+ </MenuItem>+ </Link>+ )}<Link to="/classification"><MenuItemclassName="flex w-full items-center p-2 text-sm"@@ -506,9 +511,20 @@ export default function GeneralSettings({ className }: GeneralSettingsProps) {<span>{t("menu.classification")}</span></MenuItem></Link>- </>- )}- </DropdownMenuGroup>+ {config?.genai?.model !== "none" && (+ <Link to="/chat">+ <MenuItem+ className="flex w-full items-center p-2 text-sm"+ aria-label={t("menu.chat")}+ >+ <LuMessageSquare className="mr-2 size-4" />+ <span>{t("menu.chat")}</span>+ </MenuItem>+ </Link>+ )}+ </DropdownMenuGroup>+ </>+ )}<DropdownMenuLabel className={isDesktop ? "mt-3" : "mt-1"}>{t("menu.appearance")}</DropdownMenuLabel>