File size: 847 Bytes
7c7af61
 
 
 
8ac50b9
 
 
 
 
 
 
 
 
 
7c7af61
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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"