Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 36 additions & 5 deletions src/models/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,11 @@ class FeedbackResponse(BaseModel):
```
"""

response: str
response: str = Field(
...,
description="The response of the feedback request.",
examples=["feedback received"],
)

# provides examples for /docs endpoint
model_config = {
Expand Down Expand Up @@ -391,8 +395,17 @@ class StatusResponse(BaseModel):
```
"""

functionality: str
status: dict
functionality: str = Field(
...,
description="The functionality of the service",
examples=["feedback"],
)

status: dict = Field(
...,
description="The status of the service",
examples=[{"enabled": True}],
)

# provides examples for /docs endpoint
model_config = {
Expand Down Expand Up @@ -507,8 +520,26 @@ class ConversationResponse(BaseModel):
```
"""

conversation_id: str
chat_history: list[dict[str, Any]]
conversation_id: str = Field(
...,
description="Conversation ID (UUID)",
examples=["c5260aec-4d82-4370-9fdf-05cf908b3f16"],
)

chat_history: list[dict[str, Any]] = Field(
...,
description="The simplified chat history as a list of conversation turns",
examples=[
{
"messages": [
{"content": "Hello", "type": "user"},
{"content": "Hi there!", "type": "assistant"},
],
"started_at": "2024-01-01T00:01:00Z",
"completed_at": "2024-01-01T00:01:05Z",
}
],
)

# provides examples for /docs endpoint
model_config = {
Expand Down
Loading