From 11c16f529e985bbc477941e690040effff7d228a Mon Sep 17 00:00:00 2001 From: "LocalAI [bot]" <139863280+localai-bot@users.noreply.github.com> Date: Fri, 6 Sep 2024 00:21:24 +0200 Subject: [PATCH] feat(swagger): update swagger (#3484) 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 ced239c4..44da7cf2 100644 --- a/swagger/docs.go +++ b/swagger/docs.go @@ -266,6 +266,19 @@ const docTemplate = `{ } } }, + "/system": { + "get": { + "summary": "Show the LocalAI instance information", + "responses": { + "200": { + "description": "Response", + "schema": { + "$ref": "#/definitions/schema.SystemInformationResponse" + } + } + } + } + }, "/tts": { "post": { "consumes": [ @@ -1649,6 +1662,17 @@ const docTemplate = `{ } } }, + "schema.SystemInformationResponse": { + "type": "object", + "properties": { + "backends": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, "schema.TTSRequest": { "description": "TTS request body", "type": "object", diff --git a/swagger/swagger.json b/swagger/swagger.json index c538b539..eaddf451 100644 --- a/swagger/swagger.json +++ b/swagger/swagger.json @@ -259,6 +259,19 @@ } } }, + "/system": { + "get": { + "summary": "Show the LocalAI instance information", + "responses": { + "200": { + "description": "Response", + "schema": { + "$ref": "#/definitions/schema.SystemInformationResponse" + } + } + } + } + }, "/tts": { "post": { "consumes": [ @@ -1642,6 +1655,17 @@ } } }, + "schema.SystemInformationResponse": { + "type": "object", + "properties": { + "backends": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, "schema.TTSRequest": { "description": "TTS request body", "type": "object", diff --git a/swagger/swagger.yaml b/swagger/swagger.yaml index 389543fa..c98e0ef4 100644 --- a/swagger/swagger.yaml +++ b/swagger/swagger.yaml @@ -638,6 +638,13 @@ definitions: $ref: '#/definitions/p2p.NodeData' type: array type: object + schema.SystemInformationResponse: + properties: + backends: + items: + type: string + type: array + type: object schema.TTSRequest: description: TTS request body properties: @@ -832,6 +839,14 @@ paths: schema: $ref: '#/definitions/gallery.GalleryOpStatus' summary: Returns the job status + /system: + get: + responses: + "200": + description: Response + schema: + $ref: '#/definitions/schema.SystemInformationResponse' + summary: Show the LocalAI instance information /tts: post: consumes: