Skip to content

Commit

Permalink
add example request (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
leehuwuj authored Apr 4, 2024
1 parent 29b17ee commit 5512a9e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions templates/types/streaming/fastapi/app/api/routers/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@ class _Message(BaseModel):
role: MessageRole
content: str

class Config:
json_schema_extra = {
"example": {
"messages": [
{
"role": "user",
"content": "How to tune a guitar?",
}
]
}
}


class _ChatData(BaseModel):
messages: List[_Message]
Expand Down

0 comments on commit 5512a9e

Please sign in to comment.