|
from pydantic import BaseModel |
|
from typing import List, Dict, Optional |
|
from enum import Enum |
|
|
|
|
|
class NotificationType(str, Enum): |
|
RISK_ALERT = "risk_alert" |
|
SYSTEM = "system" |
|
MESSAGE = "message" |
|
|
|
class NotificationStatus(str, Enum): |
|
UNREAD = "unread" |
|
READ = "read" |
|
ARCHIVED = "archived" |
|
class ChatRequest(BaseModel): |
|
message: str |
|
temperature: float = 0.7 |
|
max_new_tokens: int = 512 |
|
history: Optional[List[Dict]] = None |
|
format: Optional[str] = "clean" |
|
|
|
class VoiceInputRequest(BaseModel): |
|
audio_format: str = "wav" |
|
language: str = "en-US" |
|
|
|
class VoiceOutputRequest(BaseModel): |
|
text: str |
|
language: str = "en" |
|
slow: bool = False |
|
return_format: str = "mp3" |
|
|
|
class RiskLevel(str, Enum): |
|
NONE = "none" |
|
LOW = "low" |
|
MODERATE = "moderate" |
|
HIGH = "high" |
|
SEVERE = "severe" |