Compaction overhaul (#5186)
Co-authored-by: Douwe Osinga <douwe@squareup.com> Co-authored-by: David Katz <dkatz@squareup.com> Co-authored-by: Alex Hancock <alexhancock@block.xyz>
This commit is contained in:
+20
-51
@@ -2251,30 +2251,14 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"ContextLengthExceeded": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"msg"
|
||||
],
|
||||
"properties": {
|
||||
"msg": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ContextManageRequest": {
|
||||
"type": "object",
|
||||
"description": "Request payload for context management operations",
|
||||
"required": [
|
||||
"messages",
|
||||
"manageAction",
|
||||
"sessionId"
|
||||
],
|
||||
"properties": {
|
||||
"manageAction": {
|
||||
"type": "string",
|
||||
"description": "Operation to perform: \"truncation\" or \"summarize\""
|
||||
},
|
||||
"messages": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -2319,6 +2303,17 @@
|
||||
"$ref": "#/components/schemas/Message"
|
||||
}
|
||||
},
|
||||
"ConversationCompacted": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"msg"
|
||||
],
|
||||
"properties": {
|
||||
"msg": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"CreateRecipeRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -3136,7 +3131,9 @@
|
||||
"description": "A message to or from an LLM",
|
||||
"required": [
|
||||
"role",
|
||||
"content"
|
||||
"created",
|
||||
"content",
|
||||
"metadata"
|
||||
],
|
||||
"properties": {
|
||||
"content": {
|
||||
@@ -3334,7 +3331,7 @@
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/ContextLengthExceeded"
|
||||
"$ref": "#/components/schemas/ConversationCompacted"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
@@ -3345,28 +3342,7 @@
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"contextLengthExceeded"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/SummarizationRequested"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"summarizationRequested"
|
||||
"conversationCompacted"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -3382,6 +3358,10 @@
|
||||
"MessageMetadata": {
|
||||
"type": "object",
|
||||
"description": "Metadata for message visibility",
|
||||
"required": [
|
||||
"userVisible",
|
||||
"agentVisible"
|
||||
],
|
||||
"properties": {
|
||||
"agentVisible": {
|
||||
"type": "boolean",
|
||||
@@ -4429,17 +4409,6 @@
|
||||
"propertyName": "type"
|
||||
}
|
||||
},
|
||||
"SummarizationRequested": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"msg"
|
||||
],
|
||||
"properties": {
|
||||
"msg": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"TextContent": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
||||
Reference in New Issue
Block a user