From 5de7a433193d1f2f8f04c410e9992a7cfc11dfa2 Mon Sep 17 00:00:00 2001 From: "LocalAI [bot]" <139863280+localai-bot@users.noreply.github.com> Date: Sun, 5 Oct 2025 22:14:10 +0200 Subject: [PATCH] feat(swagger): update swagger (#6384) Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com> --- swagger/docs.go | 24 ++++++++++++++++++++++++ swagger/swagger.json | 24 ++++++++++++++++++++++++ swagger/swagger.yaml | 15 +++++++++++++++ 3 files changed, 63 insertions(+) diff --git a/swagger/docs.go b/swagger/docs.go index a359ae10b..4d9a6746a 100644 --- a/swagger/docs.go +++ b/swagger/docs.go @@ -215,6 +215,30 @@ const docTemplate = `{ } } }, + "/mcp/v1/completions": { + "post": { + "summary": "Generate completions for a given prompt and model.", + "parameters": [ + { + "description": "query params", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/schema.OpenAIRequest" + } + } + ], + "responses": { + "200": { + "description": "Response", + "schema": { + "$ref": "#/definitions/schema.OpenAIResponse" + } + } + } + } + }, "/metrics": { "get": { "summary": "Prometheus metrics endpoint", diff --git a/swagger/swagger.json b/swagger/swagger.json index cb9081e48..c313a3422 100644 --- a/swagger/swagger.json +++ b/swagger/swagger.json @@ -208,6 +208,30 @@ } } }, + "/mcp/v1/completions": { + "post": { + "summary": "Generate completions for a given prompt and model.", + "parameters": [ + { + "description": "query params", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/schema.OpenAIRequest" + } + } + ], + "responses": { + "200": { + "description": "Response", + "schema": { + "$ref": "#/definitions/schema.OpenAIResponse" + } + } + } + } + }, "/metrics": { "get": { "summary": "Prometheus metrics endpoint", diff --git a/swagger/swagger.yaml b/swagger/swagger.yaml index d04ac0022..23611b88c 100644 --- a/swagger/swagger.yaml +++ b/swagger/swagger.yaml @@ -872,6 +872,21 @@ paths: schema: $ref: '#/definitions/services.GalleryOpStatus' summary: Returns the job status + /mcp/v1/completions: + post: + parameters: + - description: query params + in: body + name: request + required: true + schema: + $ref: '#/definitions/schema.OpenAIRequest' + responses: + "200": + description: Response + schema: + $ref: '#/definitions/schema.OpenAIResponse' + summary: Generate completions for a given prompt and model. /metrics: get: parameters: