| from pydantic import BaseModel | |
| from typing import Optional | |
| class TextChatRequest(BaseModel): | |
| text: str | |
| conversation_id: Optional[str] = None | |
| class VoiceChatResponse(BaseModel): | |
| text_response: str | |
| audio_url: Optional[str] = None | |
| conversation_id: str | |
| class Config: | |
| json_schema_extra = { | |
| "example": { | |
| "text_response": "Hello! How can I help you today?", | |
| "audio_url": "/voice-chat/audio/123e4567", | |
| "conversation_id": "123e4567" | |
| } | |
| } |