mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-01 02:57:41 +03:00
reuse enum
This commit is contained in:
parent
938c7fbdf6
commit
f18cb23071
@ -1,7 +1,9 @@
|
|||||||
from typing import List, Literal, Optional, Union
|
from typing import List, Optional, Union
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
|
from frigate.config.classification import TriggerType
|
||||||
|
|
||||||
|
|
||||||
class EventsSubLabelBody(BaseModel):
|
class EventsSubLabelBody(BaseModel):
|
||||||
subLabel: str = Field(title="Sub label", max_length=100)
|
subLabel: str = Field(title="Sub label", max_length=100)
|
||||||
@ -48,6 +50,6 @@ class SubmitPlusBody(BaseModel):
|
|||||||
|
|
||||||
|
|
||||||
class TriggerEmbeddingBody(BaseModel):
|
class TriggerEmbeddingBody(BaseModel):
|
||||||
type: Literal["thumbnail", "description"]
|
type: TriggerType
|
||||||
data: str
|
data: str
|
||||||
threshold: float = Field(default=0.5, ge=0.0, le=1.0)
|
threshold: float = Field(default=0.5, ge=0.0, le=1.0)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user