mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-03-30 00:46:42 +00:00
feat: openai response /v1/response/compact (#2644)
* feat: openai response /v1/response/compact * feat: /v1/response/compact bill * feat: /v1/response/compact * feat: /v1/responses/compact -> codex channel * feat: /v1/responses/compact -> codex channel * feat: /v1/responses/compact -> codex channel * feat: codex channel default models * feat: compact model price * feat: /v1/responses/comapct test
This commit is contained in:
@@ -284,6 +284,46 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/responses/compact": {
|
||||
"post": {
|
||||
"summary": "压缩对话 (OpenAI Responses API)",
|
||||
"deprecated": false,
|
||||
"description": "OpenAI Responses API,用于对长对话进行 compaction。",
|
||||
"operationId": "compactResponse",
|
||||
"tags": [
|
||||
"OpenAI格式(Responses)"
|
||||
],
|
||||
"parameters": [],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ResponsesCompactionRequest"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "成功压缩对话",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ResponsesCompactionResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"headers": {}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/images/generations": {
|
||||
"post": {
|
||||
@@ -3130,10 +3170,71 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"ResponsesStreamResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"ResponsesCompactionResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"object": {
|
||||
"type": "string",
|
||||
"example": "response.compaction"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "integer"
|
||||
},
|
||||
"output": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {}
|
||||
}
|
||||
},
|
||||
"usage": {
|
||||
"$ref": "#/components/schemas/Usage"
|
||||
},
|
||||
"error": {
|
||||
"type": "object",
|
||||
"properties": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ResponsesCompactionRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"model"
|
||||
],
|
||||
"properties": {
|
||||
"model": {
|
||||
"type": "string"
|
||||
},
|
||||
"input": {
|
||||
"description": "输入内容,可以是字符串或消息数组",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"instructions": {
|
||||
"type": "string"
|
||||
},
|
||||
"previous_response_id": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ResponsesStreamResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
"response": {
|
||||
@@ -7138,4 +7239,4 @@
|
||||
"BearerAuth": []
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user