From f18cb23071d28bd53288a7e12a00c7372c7e8e86 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Mon, 7 Jul 2025 08:52:16 -0500 Subject: [PATCH] reuse enum --- frigate/api/defs/request/events_body.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frigate/api/defs/request/events_body.py b/frigate/api/defs/request/events_body.py index 73456fb47..dd18ff8f7 100644 --- a/frigate/api/defs/request/events_body.py +++ b/frigate/api/defs/request/events_body.py @@ -1,7 +1,9 @@ -from typing import List, Literal, Optional, Union +from typing import List, Optional, Union from pydantic import BaseModel, Field +from frigate.config.classification import TriggerType + class EventsSubLabelBody(BaseModel): subLabel: str = Field(title="Sub label", max_length=100) @@ -48,6 +50,6 @@ class SubmitPlusBody(BaseModel): class TriggerEmbeddingBody(BaseModel): - type: Literal["thumbnail", "description"] + type: TriggerType data: str threshold: float = Field(default=0.5, ge=0.0, le=1.0)