File size: 333 Bytes
e425487
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# utils/validators.py
from pydantic import BaseModel
from typing import List, Optional

class ChatRequest(BaseModel):
    message: str
    session_id: Optional[str] = None
    history: Optional[List[List[str]]] = []

class ChatResponse(BaseModel):
    reply: str
    session_id: str
    status_info: str
    history: List[List[str]]