chatbot / models.py
Soumik555's picture
hello
5344861
raw
history blame contribute delete
553 Bytes
from pydantic import BaseModel
class ChatRequest(BaseModel):
message: str
max_length: int = 100
temperature: float = 0.7
top_p: float = 0.9
class Config:
protected_namespaces = ()
class ChatResponse(BaseModel):
response: str
model_name: str
response_time: float
class Config:
protected_namespaces = ()
class HealthResponse(BaseModel):
status: str
is_model_loaded: bool
model_name: str
cache_directory: str
startup_time: float
class Config:
protected_namespaces = ()