mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-27 17:17:40 +03:00
config
This commit is contained in:
parent
a3a53a809f
commit
34d184a3b9
@ -25,6 +25,17 @@ class EnrichmentsDeviceEnum(str, Enum):
|
|||||||
CPU = "CPU"
|
CPU = "CPU"
|
||||||
|
|
||||||
|
|
||||||
|
class TriggerType(str, Enum):
|
||||||
|
TEXT = "text"
|
||||||
|
IMAGE = "image"
|
||||||
|
BOTH = "both"
|
||||||
|
|
||||||
|
|
||||||
|
class TriggerAction(str, Enum):
|
||||||
|
ALERT = "alert"
|
||||||
|
NOTIFICATION = "notification"
|
||||||
|
|
||||||
|
|
||||||
class AudioTranscriptionConfig(FrigateBaseModel):
|
class AudioTranscriptionConfig(FrigateBaseModel):
|
||||||
enabled: bool = Field(default=False, title="Enable audio transcription.")
|
enabled: bool = Field(default=False, title="Enable audio transcription.")
|
||||||
language: str = Field(
|
language: str = Field(
|
||||||
@ -114,9 +125,26 @@ class SemanticSearchConfig(FrigateBaseModel):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class TriggerConfig(FrigateBaseModel):
|
||||||
|
type: TriggerType = Field(default=TriggerType.TEXT, title="Type of trigger")
|
||||||
|
data: str = Field(title="Trigger content (text phrase or image ID)")
|
||||||
|
threshold: float = Field(
|
||||||
|
title="Confidence score required to run the trigger.",
|
||||||
|
default=0.8,
|
||||||
|
gt=0.0,
|
||||||
|
le=1.0,
|
||||||
|
)
|
||||||
|
actions: Optional[List[TriggerAction]] = Field(
|
||||||
|
default=[], title="Actions to perform when trigger is matched"
|
||||||
|
)
|
||||||
|
|
||||||
|
model_config = ConfigDict(extra="forbid", protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
class CameraSemanticSearchConfig(FrigateBaseModel):
|
class CameraSemanticSearchConfig(FrigateBaseModel):
|
||||||
triggers: Optional[list[str]] = Field(
|
triggers: Optional[Dict[str, TriggerConfig]] = Field(
|
||||||
default=None, title="Text phrases to elevate tracked objects to review alerts."
|
default=None,
|
||||||
|
title="Text or image triggers to elevate tracked objects to review alerts",
|
||||||
)
|
)
|
||||||
|
|
||||||
model_config = ConfigDict(extra="forbid", protected_namespaces=())
|
model_config = ConfigDict(extra="forbid", protected_namespaces=())
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user