Skip to content

Commit 31e96ca

Browse files
authored
Merge pull request #536 from tisnik/lcore-390-field-description-for-conversation-details
LCORE-390: field description for ConversationDetails model
2 parents e4472fe + 012b397 commit 31e96ca

File tree

4 files changed

+79
-24
lines changed

4 files changed

+79
-24
lines changed

docs/openapi.json

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,11 @@
11001100
"properties": {
11011101
"conversation_id": {
11021102
"type": "string",
1103-
"title": "Conversation Id"
1103+
"title": "Conversation Id",
1104+
"description": "Conversation ID (UUID)",
1105+
"examples": [
1106+
"c5260aec-4d82-4370-9fdf-05cf908b3f16"
1107+
]
11041108
},
11051109
"created_at": {
11061110
"anyOf": [
@@ -1111,7 +1115,11 @@
11111115
"type": "null"
11121116
}
11131117
],
1114-
"title": "Created At"
1118+
"title": "Created At",
1119+
"description": "When the conversation was created",
1120+
"examples": [
1121+
"2024-01-01T01:00:00Z"
1122+
]
11151123
},
11161124
"last_message_at": {
11171125
"anyOf": [
@@ -1122,7 +1130,11 @@
11221130
"type": "null"
11231131
}
11241132
],
1125-
"title": "Last Message At"
1133+
"title": "Last Message At",
1134+
"description": "When the last message was sent",
1135+
"examples": [
1136+
"2024-01-01T01:00:00Z"
1137+
]
11261138
},
11271139
"message_count": {
11281140
"anyOf": [
@@ -1133,7 +1145,11 @@
11331145
"type": "null"
11341146
}
11351147
],
1136-
"title": "Message Count"
1148+
"title": "Message Count",
1149+
"description": "Number of user messages in the conversation",
1150+
"examples": [
1151+
42
1152+
]
11371153
},
11381154
"last_used_model": {
11391155
"anyOf": [
@@ -1144,7 +1160,12 @@
11441160
"type": "null"
11451161
}
11461162
],
1147-
"title": "Last Used Model"
1163+
"title": "Last Used Model",
1164+
"description": "Identification of the last model used for the conversation",
1165+
"examples": [
1166+
"gpt-4-turbo",
1167+
"gpt-3.5-turbo-0125"
1168+
]
11481169
},
11491170
"last_used_provider": {
11501171
"anyOf": [
@@ -1155,7 +1176,12 @@
11551176
"type": "null"
11561177
}
11571178
],
1158-
"title": "Last Used Provider"
1179+
"title": "Last Used Provider",
1180+
"description": "Identification of the last provider used for the conversation",
1181+
"examples": [
1182+
"openai",
1183+
"gemini"
1184+
]
11591185
}
11601186
},
11611187
"type": "object",

docs/openapi.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -609,12 +609,12 @@ Example:
609609

610610
| Field | Type | Description |
611611
|-------|------|-------------|
612-
| conversation_id | string | |
613-
| created_at | | |
614-
| last_message_at | | |
615-
| message_count | | |
616-
| last_used_model | | |
617-
| last_used_provider | | |
612+
| conversation_id | string | Conversation ID (UUID) |
613+
| created_at | | When the conversation was created |
614+
| last_message_at | | When the last message was sent |
615+
| message_count | | Number of user messages in the conversation |
616+
| last_used_model | | Identification of the last model used for the conversation |
617+
| last_used_provider | | Identification of the last provider used for the conversation |
618618

619619

620620
## ConversationResponse

docs/output.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -609,12 +609,12 @@ Example:
609609

610610
| Field | Type | Description |
611611
|-------|------|-------------|
612-
| conversation_id | string | |
613-
| created_at | | |
614-
| last_message_at | | |
615-
| message_count | | |
616-
| last_used_model | | |
617-
| last_used_provider | | |
612+
| conversation_id | string | Conversation ID (UUID) |
613+
| created_at | | When the conversation was created |
614+
| last_message_at | | When the last message was sent |
615+
| message_count | | Number of user messages in the conversation |
616+
| last_used_model | | Identification of the last model used for the conversation |
617+
| last_used_provider | | Identification of the last provider used for the conversation |
618618

619619

620620
## ConversationResponse

src/models/responses.py

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -482,12 +482,41 @@ class ConversationDetails(BaseModel):
482482
```
483483
"""
484484

485-
conversation_id: str
486-
created_at: Optional[str] = None
487-
last_message_at: Optional[str] = None
488-
message_count: Optional[int] = None
489-
last_used_model: Optional[str] = None
490-
last_used_provider: Optional[str] = None
485+
conversation_id: str = Field(
486+
...,
487+
description="Conversation ID (UUID)",
488+
examples=["c5260aec-4d82-4370-9fdf-05cf908b3f16"],
489+
)
490+
491+
created_at: Optional[str] = Field(
492+
None,
493+
description="When the conversation was created",
494+
examples=["2024-01-01T01:00:00Z"],
495+
)
496+
497+
last_message_at: Optional[str] = Field(
498+
None,
499+
description="When the last message was sent",
500+
examples=["2024-01-01T01:00:00Z"],
501+
)
502+
503+
message_count: Optional[int] = Field(
504+
None,
505+
description="Number of user messages in the conversation",
506+
examples=[42],
507+
)
508+
509+
last_used_model: Optional[str] = Field(
510+
None,
511+
description="Identification of the last model used for the conversation",
512+
examples=["gpt-4-turbo", "gpt-3.5-turbo-0125"],
513+
)
514+
515+
last_used_provider: Optional[str] = Field(
516+
None,
517+
description="Identification of the last provider used for the conversation",
518+
examples=["openai", "gemini"],
519+
)
491520

492521

493522
class ConversationsListResponse(BaseModel):

0 commit comments

Comments
 (0)