test24 / api /models.py
Niansuh's picture
Update api/models.py
3ea5ab0 verified
raw
history blame
291 Bytes
from typing import List
from pydantic import BaseModel
class Message(BaseModel):
role: str
content: str
class ChatRequest(BaseModel):
model: str
messages: List[Message]
stream: bool = False
temperature: float = 0.5
top_p: float = 0.9
max_tokens: int = 1024