mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-25 22:20:43 +00:00
24 lines
735 B
Python
24 lines
735 B
Python
from collections.abc import Mapping
|
|
from typing import Literal, Protocol
|
|
|
|
from pydantic import AwareDatetime, ConfigDict, Field
|
|
|
|
from litellm.types.llms.base import LiteLLMBaseModel
|
|
|
|
|
|
class AdminIgnore(LiteLLMBaseModel):
|
|
model_config = ConfigDict(frozen=True)
|
|
|
|
source: Literal["admin"] = "admin"
|
|
ignored_by: str
|
|
ignored_at: AwareDatetime
|
|
ignored_until: AwareDatetime | None = Field(
|
|
default=None,
|
|
description="When the snooze ends. Null means the warning is ignored until an admin restores it.",
|
|
)
|
|
|
|
|
|
class DeploymentWarningIgnoreStore(Protocol):
|
|
async def get_ignores(self) -> Mapping[str, AdminIgnore]: ...
|
|
|
|
async def save_ignores(self, ignores: Mapping[str, AdminIgnore]) -> None: ...
|