File size: 546 Bytes
a71355d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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"
            }
        }