Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions api-reference/chat/segment.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: "Get Chat Segment"
openapi: "/api-reference/openapi.json GET /api/chats/{id}/segment"
---
112 changes: 112 additions & 0 deletions api-reference/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1245,6 +1245,65 @@
}
}
},
"/api/chats/{id}/segment": {
"get": {
"description": "Retrieve the segment associated with a specific chat room. Returns 404 if the chat does not exist or is not accessible by the authenticated caller.",
"parameters": [
{
"name": "id",
"in": "path",
"description": "The unique identifier (UUID) of the chat room.",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "Chat segment resolved successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetChatSegmentResponse"
}
}
}
},
"400": {
"description": "Bad request - invalid chat id",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetChatSegmentErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized - invalid or missing credentials",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not found - chat does not exist or is not accessible",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetChatSegmentErrorResponse"
}
}
}
}
}
}
},
"/api/chats/compact": {
"post": {
"description": "Compact one or more chat conversations into summarized versions. This reduces the size of chat history while preserving key information. Optionally provide a prompt to control what information gets preserved in the compacted summary.",
Expand Down Expand Up @@ -6436,6 +6495,59 @@
}
}
},
"GetChatSegmentResponse": {
"type": "object",
"required": [
"status",
"room_id",
"segment_id",
"segment_exists"
],
"properties": {
"status": {
"type": "string",
"enum": [
"success"
],
"description": "Status of the request"
},
"room_id": {
"type": "string",
"format": "uuid",
"description": "UUID of the chat room"
},
"segment_id": {
"type": "string",
"format": "uuid",
"nullable": true,
"description": "UUID of the segment associated with the chat, or null when no segment is linked"
},
"segment_exists": {
"type": "boolean",
"description": "Whether a segment is linked to the chat room"
}
}
},
"GetChatSegmentErrorResponse": {
"type": "object",
"required": [
"status",
"error"
],
"properties": {
"status": {
"type": "string",
"enum": [
"error"
],
"description": "Status of the request"
},
"error": {
"type": "string",
"description": "Error message describing what went wrong"
}
}
},
"CreateChatRequest": {
"type": "object",
"properties": {
Expand Down
3 changes: 2 additions & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"group": "Chat",
"pages": [
"api-reference/chat/chats",
"api-reference/chat/segment",
"api-reference/chat/create",
"api-reference/chat/update",
"api-reference/chat/generate",
Expand Down Expand Up @@ -323,4 +324,4 @@
"og:site_name": "Recoup",
"twitter:card": "summary_large_image"
}
}
}