Skip to content

Commit

Permalink
add example request
Browse files Browse the repository at this point in the history
  • Loading branch information
leehuwuj committed Apr 2, 2024
1 parent c06d4af commit 06d0667
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 06d0667

Please sign in to comment.