Skip to content
Open
Show file tree
Hide file tree
Changes from 4 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
250 changes: 250 additions & 0 deletions api/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2796,6 +2796,63 @@
},
"type": "array"
},
"CocoonWorkerInstance": {
"properties": {
"active_requests": {
"format": "int64",
"minimum": 0,
"type": "integer"
},
"coefficient": {
"format": "int64",
"minimum": 0,
"type": "integer"
},
"max_active_requests": {
"format": "int64",
"minimum": 0,
"type": "integer"
}
},
"required": [
"coefficient",
"active_requests",
"max_active_requests"
],
"type": "object"
},
"CocoonWorkerType": {
"properties": {
"name": {
"type": "string"
},
"workers": {
"items": {
"$ref": "#/components/schemas/CocoonWorkerInstance"
},
"type": "array"
}
},
"required": [
"name",
"workers"
],
"type": "object"
},
"CocoonWorkersResponse": {
"properties": {
"types": {
"items": {
"$ref": "#/components/schemas/CocoonWorkerType"
},
"type": "array"
}
},
"required": [
"types"
],
"type": "object"
},
"ComputePhase": {
"properties": {
"exit_code": {
Expand Down Expand Up @@ -7711,6 +7768,199 @@
},
"openapi": "3.0.0",
"paths": {
"/cocoon/query": {
"post": {
"description": "Proxy arbitrary OpenAI-style JSON to Cocoon (POST)",
"operationId": "postCocoonQuery",
"parameters": [
{
"description": "Cocoon worker model name passed to the proxy.",
"in": "query",
"name": "model",
"schema": {
"type": "string"
}
},
{
"description": "HTTP path on the Cocoon worker (e.g. /v1/chat/completions).",
"in": "query",
"name": "path",
"schema": {
"default": "/query",
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {}
}
},
"description": "Successful response"
},
"401": {
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"message": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
},
"description": "Unauthorized"
},
"501": {
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
},
"description": "Not implemented"
},
"default": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/cocoon/v1/chat/completions": {
"post": {
"description": "OpenAI-compatible [Create chat completion](https://developers.openai.com/api/reference/resources/chat/subresources/completions/methods/create).\nForwards the JSON body to Cocoon as `POST /v1/chat/completions` (same as `/cocoon/query` with `path=/v1/chat/completions`).\n",
"operationId": "postCocoonV1ChatCompletions",
"requestBody": {
"content": {
"application/json": {
"schema": {}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {}
}
},
"description": "Successful response"
},
"401": {
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"message": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
},
"description": "Unauthorized"
},
"501": {
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
},
"description": "Not implemented"
},
"default": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/cocoon/workers": {
"get": {
"description": "Cocoon worker types (same shape as gocoon Connection.GetWorkerTypes)",
"operationId": "getCocoonWorkers",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CocoonWorkersResponse"
}
}
},
"description": "Successful response"
},
"401": {
"content": {
"application/json": {
"schema": {
"properties": {
"error": {
"properties": {
"message": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
}
},
"description": "Unauthorized"
},
"501": {
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
},
"description": "Not implemented"
},
"default": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/v2/accounts/_bulk": {
"post": {
"description": "Get human-friendly information about several accounts without low-level details.",
Expand Down
Loading
Loading