Spaces:
Runtime error
Runtime error
| from pydantic import BaseModel | |
| from typing import List, Dict, Optional | |
| from enum import Enum | |
| 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" |