test24 / api /models.py
Niansuh's picture
Upload 15 files
00a7e34 verified
raw
history blame
366 Bytes
from typing import List, Optional
from pydantic import BaseModel
class Message(BaseModel):
role: str
content: str | list
class ChatRequest(BaseModel):
model: str
messages: List[Message]
stream: Optional[bool] = False
temperature: Optional[float] = 0.5
top_p: Optional[float] = 0.9
max_tokens: Optional[int] = 99999999