Overview
The Get Chat query allows users to retrieve chat messages for a specific chat session. This is useful for displaying the conversation history in the user interface or for processing chat data.
Architecture
Behavior
The Get Chat query follows these steps:
- Validates the provided chat ID format.
- Queries the chat repository to fetch the chat session and its messages.
- If the chat session is not found, returns a 404 Not Found response.
- Maps the chat session and messages to a DTO using the configured auto-mapper.
- Returns the chat data with a 200 OK status code.
GET /api/v1/chats/{id}
Parameters
- id (path) (required) - The unique identifier (GUID) of the chat session to retrieve.
Request Body
This query does not require a request body.
Response
200 OK
404 Not Found
The unique identifier for the chat
The name of the chat
The unique identifier for the user who sent the chat message
The unique identifier for the chat message
The text content of the chat message
The role of the sender of the chat message, e.g., 'user' or 'assistant'
The unique identifier for the parent chat message, if applicable
The timestamp when the chat message was created
No properties match your search
Try a different search term or clear the search to see all properties
No properties match your search
Try a different search term or clear the search to see all properties