From 58cdf454accc9efdf0bf6f117effdae514fac1ca Mon Sep 17 00:00:00 2001 From: Pavel Tisnovsky Date: Sun, 14 Sep 2025 10:47:04 +0200 Subject: [PATCH 1/2] LCORE-390: field description for ConversationDetails model --- src/models/responses.py | 41 +++++++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/src/models/responses.py b/src/models/responses.py index 76f6daea..c8443ac8 100644 --- a/src/models/responses.py +++ b/src/models/responses.py @@ -482,12 +482,41 @@ class ConversationDetails(BaseModel): ``` """ - conversation_id: str - created_at: Optional[str] = None - last_message_at: Optional[str] = None - message_count: Optional[int] = None - last_used_model: Optional[str] = None - last_used_provider: Optional[str] = None + conversation_id: str = Field( + "", + description="Conversation ID (UUID)", + examples=["c5260aec-4d82-4370-9fdf-05cf908b3f16"], + ) + + created_at: Optional[str] = Field( + None, + description="When the conversation was created", + examples=["2024-01-01T01:00:00Z"], + ) + + last_message_at: Optional[str] = Field( + None, + description="When the last message was sent", + examples=["2024-01-01T01:00:00Z"], + ) + + message_count: Optional[int] = Field( + None, + description="Number of user messages in the conversation", + examples=[42], + ) + + last_used_model: Optional[str] = Field( + None, + description="Identification of the last model used for the conversation", + examples=["gpt-4-turbo", "gpt-3.5-turbo-0125"], + ) + + last_used_provider: Optional[str] = Field( + None, + description="Identification of the last provider used for the conversation", + examples=["openai", "gemini"], + ) class ConversationsListResponse(BaseModel): From 012b39710acc4acaa4062eebfdf53d7f1b5a885b Mon Sep 17 00:00:00 2001 From: Pavel Tisnovsky Date: Sun, 14 Sep 2025 10:47:22 +0200 Subject: [PATCH 2/2] Updated OpenAPI documentation accordingly --- docs/openapi.json | 38 ++++++++++++++++++++++++++++++++------ docs/openapi.md | 12 ++++++------ docs/output.md | 12 ++++++------ src/models/responses.py | 2 +- 4 files changed, 45 insertions(+), 19 deletions(-) diff --git a/docs/openapi.json b/docs/openapi.json index b5c267db..80e27620 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -1100,7 +1100,11 @@ "properties": { "conversation_id": { "type": "string", - "title": "Conversation Id" + "title": "Conversation Id", + "description": "Conversation ID (UUID)", + "examples": [ + "c5260aec-4d82-4370-9fdf-05cf908b3f16" + ] }, "created_at": { "anyOf": [ @@ -1111,7 +1115,11 @@ "type": "null" } ], - "title": "Created At" + "title": "Created At", + "description": "When the conversation was created", + "examples": [ + "2024-01-01T01:00:00Z" + ] }, "last_message_at": { "anyOf": [ @@ -1122,7 +1130,11 @@ "type": "null" } ], - "title": "Last Message At" + "title": "Last Message At", + "description": "When the last message was sent", + "examples": [ + "2024-01-01T01:00:00Z" + ] }, "message_count": { "anyOf": [ @@ -1133,7 +1145,11 @@ "type": "null" } ], - "title": "Message Count" + "title": "Message Count", + "description": "Number of user messages in the conversation", + "examples": [ + 42 + ] }, "last_used_model": { "anyOf": [ @@ -1144,7 +1160,12 @@ "type": "null" } ], - "title": "Last Used Model" + "title": "Last Used Model", + "description": "Identification of the last model used for the conversation", + "examples": [ + "gpt-4-turbo", + "gpt-3.5-turbo-0125" + ] }, "last_used_provider": { "anyOf": [ @@ -1155,7 +1176,12 @@ "type": "null" } ], - "title": "Last Used Provider" + "title": "Last Used Provider", + "description": "Identification of the last provider used for the conversation", + "examples": [ + "openai", + "gemini" + ] } }, "type": "object", diff --git a/docs/openapi.md b/docs/openapi.md index a9f9d022..0c18c41f 100644 --- a/docs/openapi.md +++ b/docs/openapi.md @@ -609,12 +609,12 @@ Example: | Field | Type | Description | |-------|------|-------------| -| conversation_id | string | | -| created_at | | | -| last_message_at | | | -| message_count | | | -| last_used_model | | | -| last_used_provider | | | +| conversation_id | string | Conversation ID (UUID) | +| created_at | | When the conversation was created | +| last_message_at | | When the last message was sent | +| message_count | | Number of user messages in the conversation | +| last_used_model | | Identification of the last model used for the conversation | +| last_used_provider | | Identification of the last provider used for the conversation | ## ConversationResponse diff --git a/docs/output.md b/docs/output.md index d5e78826..144fabef 100644 --- a/docs/output.md +++ b/docs/output.md @@ -609,12 +609,12 @@ Example: | Field | Type | Description | |-------|------|-------------| -| conversation_id | string | | -| created_at | | | -| last_message_at | | | -| message_count | | | -| last_used_model | | | -| last_used_provider | | | +| conversation_id | string | Conversation ID (UUID) | +| created_at | | When the conversation was created | +| last_message_at | | When the last message was sent | +| message_count | | Number of user messages in the conversation | +| last_used_model | | Identification of the last model used for the conversation | +| last_used_provider | | Identification of the last provider used for the conversation | ## ConversationResponse diff --git a/src/models/responses.py b/src/models/responses.py index c8443ac8..96d8dc60 100644 --- a/src/models/responses.py +++ b/src/models/responses.py @@ -483,7 +483,7 @@ class ConversationDetails(BaseModel): """ conversation_id: str = Field( - "", + ..., description="Conversation ID (UUID)", examples=["c5260aec-4d82-4370-9fdf-05cf908b3f16"], )