mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-23 20:29:02 +03:00
* render orphaned filter entries as collapsibles instead of the Key/Value editor * Symlink for various AI files * change replay confg dialog to platform aware sheet * change agents title * fix test * tweak collapsible * remove camera ui section in settings no point to having it anymore with profiles and camera management settings * fix admin response cache leak to non-admin users via nginx proxy_cache * add model fetcher endpoint for genai config ui --------- Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
61 lines
1.5 KiB
Python
61 lines
1.5 KiB
Python
from typing import Any, Dict, List, Optional
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
from frigate.config import GenAIProviderEnum
|
|
|
|
|
|
class AppConfigSetBody(BaseModel):
|
|
requires_restart: int = 1
|
|
update_topic: str | None = None
|
|
config_data: Optional[Dict[str, Any]] = None
|
|
skip_save: bool = False
|
|
|
|
|
|
class GenAIProbeBody(BaseModel):
|
|
provider: GenAIProviderEnum
|
|
api_key: Optional[str] = None
|
|
base_url: Optional[str] = None
|
|
provider_options: Dict[str, Any] = Field(default_factory=dict)
|
|
|
|
|
|
class AppPutPasswordBody(BaseModel):
|
|
password: str
|
|
old_password: Optional[str] = None
|
|
|
|
|
|
class AppPostUsersBody(BaseModel):
|
|
username: str
|
|
password: str
|
|
role: Optional[str] = "viewer"
|
|
|
|
|
|
class AppPostLoginBody(BaseModel):
|
|
user: str
|
|
password: str
|
|
|
|
|
|
class AppPutRoleBody(BaseModel):
|
|
role: str
|
|
|
|
|
|
class CameraSetBody(BaseModel):
|
|
value: str = Field(..., description="The value to set for the feature")
|
|
|
|
|
|
class MediaSyncBody(BaseModel):
|
|
dry_run: bool = Field(
|
|
default=True, description="If True, only report orphans without deleting them"
|
|
)
|
|
media_types: List[str] = Field(
|
|
default=["all"],
|
|
description="Types of media to sync: 'all', 'event_snapshots', 'event_thumbnails', 'review_thumbnails', 'previews', 'exports', 'recordings'",
|
|
)
|
|
force: bool = Field(
|
|
default=False, description="If True, bypass safety threshold checks"
|
|
)
|
|
verbose: bool = Field(
|
|
default=False,
|
|
description="If True, write full orphan file list to disk",
|
|
)
|