mirror of
https://github.com/mudler/LocalAI.git
synced 2025-04-26 05:50:01 +00:00
feat(swagger): update swagger (#2464)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
This commit is contained in:
parent
b99182c8d4
commit
fb0f188c93
@ -22,6 +22,36 @@ const docTemplate = `{
|
|||||||
"host": "{{.Host}}",
|
"host": "{{.Host}}",
|
||||||
"basePath": "{{.BasePath}}",
|
"basePath": "{{.BasePath}}",
|
||||||
"paths": {
|
"paths": {
|
||||||
|
"/tts": {
|
||||||
|
"post": {
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"audio/x-wav"
|
||||||
|
],
|
||||||
|
"summary": "Generates audio from the input text.",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "query params",
|
||||||
|
"name": "request",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/schema.TTSRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "generated audio/wav file",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/v1/assistants": {
|
"/v1/assistants": {
|
||||||
"post": {
|
"post": {
|
||||||
"summary": "Create an assistant with a model and instructions.",
|
"summary": "Create an assistant with a model and instructions.",
|
||||||
@ -48,6 +78,12 @@ const docTemplate = `{
|
|||||||
},
|
},
|
||||||
"/v1/audio/speech": {
|
"/v1/audio/speech": {
|
||||||
"post": {
|
"post": {
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"audio/x-wav"
|
||||||
|
],
|
||||||
"summary": "Generates audio from the input text.",
|
"summary": "Generates audio from the input text.",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
@ -62,7 +98,7 @@ const docTemplate = `{
|
|||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "Response",
|
"description": "generated audio/wav file",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
@ -771,18 +807,26 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"schema.TTSRequest": {
|
"schema.TTSRequest": {
|
||||||
|
"description": "TTS request body",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"backend": {
|
"backend": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"input": {
|
"input": {
|
||||||
|
"description": "text input",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"language": {
|
||||||
|
"description": "(optional) language to use with TTS model",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"model": {
|
"model": {
|
||||||
|
"description": "model name or full path",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"voice": {
|
"voice": {
|
||||||
|
"description": "voice audio file or speaker id",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,36 @@
|
|||||||
},
|
},
|
||||||
"basePath": "/",
|
"basePath": "/",
|
||||||
"paths": {
|
"paths": {
|
||||||
|
"/tts": {
|
||||||
|
"post": {
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"audio/x-wav"
|
||||||
|
],
|
||||||
|
"summary": "Generates audio from the input text.",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "query params",
|
||||||
|
"name": "request",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/schema.TTSRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "generated audio/wav file",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/v1/assistants": {
|
"/v1/assistants": {
|
||||||
"post": {
|
"post": {
|
||||||
"summary": "Create an assistant with a model and instructions.",
|
"summary": "Create an assistant with a model and instructions.",
|
||||||
@ -41,6 +71,12 @@
|
|||||||
},
|
},
|
||||||
"/v1/audio/speech": {
|
"/v1/audio/speech": {
|
||||||
"post": {
|
"post": {
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"audio/x-wav"
|
||||||
|
],
|
||||||
"summary": "Generates audio from the input text.",
|
"summary": "Generates audio from the input text.",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
@ -55,7 +91,7 @@
|
|||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "Response",
|
"description": "generated audio/wav file",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
@ -764,18 +800,26 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"schema.TTSRequest": {
|
"schema.TTSRequest": {
|
||||||
|
"description": "TTS request body",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"backend": {
|
"backend": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"input": {
|
"input": {
|
||||||
|
"description": "text input",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"language": {
|
||||||
|
"description": "(optional) language to use with TTS model",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"model": {
|
"model": {
|
||||||
|
"description": "model name or full path",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"voice": {
|
"voice": {
|
||||||
|
"description": "voice audio file or speaker id",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -367,14 +367,21 @@ definitions:
|
|||||||
type: integer
|
type: integer
|
||||||
type: object
|
type: object
|
||||||
schema.TTSRequest:
|
schema.TTSRequest:
|
||||||
|
description: TTS request body
|
||||||
properties:
|
properties:
|
||||||
backend:
|
backend:
|
||||||
type: string
|
type: string
|
||||||
input:
|
input:
|
||||||
|
description: text input
|
||||||
|
type: string
|
||||||
|
language:
|
||||||
|
description: (optional) language to use with TTS model
|
||||||
type: string
|
type: string
|
||||||
model:
|
model:
|
||||||
|
description: model name or full path
|
||||||
type: string
|
type: string
|
||||||
voice:
|
voice:
|
||||||
|
description: voice audio file or speaker id
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
schema.ToolCall:
|
schema.ToolCall:
|
||||||
@ -399,6 +406,25 @@ info:
|
|||||||
title: LocalAI API
|
title: LocalAI API
|
||||||
version: 2.0.0
|
version: 2.0.0
|
||||||
paths:
|
paths:
|
||||||
|
/tts:
|
||||||
|
post:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- description: query params
|
||||||
|
in: body
|
||||||
|
name: request
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/schema.TTSRequest'
|
||||||
|
produces:
|
||||||
|
- audio/x-wav
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: generated audio/wav file
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
summary: Generates audio from the input text.
|
||||||
/v1/assistants:
|
/v1/assistants:
|
||||||
post:
|
post:
|
||||||
parameters:
|
parameters:
|
||||||
@ -416,6 +442,8 @@ paths:
|
|||||||
summary: Create an assistant with a model and instructions.
|
summary: Create an assistant with a model and instructions.
|
||||||
/v1/audio/speech:
|
/v1/audio/speech:
|
||||||
post:
|
post:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
parameters:
|
parameters:
|
||||||
- description: query params
|
- description: query params
|
||||||
in: body
|
in: body
|
||||||
@ -423,9 +451,11 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/schema.TTSRequest'
|
$ref: '#/definitions/schema.TTSRequest'
|
||||||
|
produces:
|
||||||
|
- audio/x-wav
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: Response
|
description: generated audio/wav file
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
summary: Generates audio from the input text.
|
summary: Generates audio from the input text.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user