feat(swagger): update swagger (#7356)

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:
LocalAI [bot]
2025-11-25 22:19:53 +01:00
committed by GitHub
parent f9f9b9d444
commit 304ac94d01
3 changed files with 192 additions and 26 deletions

View File

@@ -634,6 +634,83 @@ const docTemplate = `{
}
}
},
"/v1/images/inpainting": {
"post": {
"description": "Perform image inpainting. Accepts multipart/form-data with ` + "`" + `image` + "`" + ` and ` + "`" + `mask` + "`" + ` files.",
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"tags": [
"images"
],
"summary": "Image inpainting",
"parameters": [
{
"type": "string",
"description": "Model identifier",
"name": "model",
"in": "formData",
"required": true
},
{
"type": "string",
"description": "Text prompt guiding the generation",
"name": "prompt",
"in": "formData",
"required": true
},
{
"type": "integer",
"description": "Number of inference steps (default 25)",
"name": "steps",
"in": "formData"
},
{
"type": "file",
"description": "Original image file",
"name": "image",
"in": "formData",
"required": true
},
{
"type": "file",
"description": "Mask image file (white = area to inpaint)",
"name": "mask",
"in": "formData",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/schema.OpenAIResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/v1/mcp/chat/completions": {
"post": {
"summary": "Stream MCP chat completions with reasoning, tool calls, and results",

View File

@@ -627,6 +627,83 @@
}
}
},
"/v1/images/inpainting": {
"post": {
"description": "Perform image inpainting. Accepts multipart/form-data with `image` and `mask` files.",
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"tags": [
"images"
],
"summary": "Image inpainting",
"parameters": [
{
"type": "string",
"description": "Model identifier",
"name": "model",
"in": "formData",
"required": true
},
{
"type": "string",
"description": "Text prompt guiding the generation",
"name": "prompt",
"in": "formData",
"required": true
},
{
"type": "integer",
"description": "Number of inference steps (default 25)",
"name": "steps",
"in": "formData"
},
{
"type": "file",
"description": "Original image file",
"name": "image",
"in": "formData",
"required": true
},
{
"type": "file",
"description": "Mask image file (white = area to inpaint)",
"name": "mask",
"in": "formData",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/schema.OpenAIResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/v1/mcp/chat/completions": {
"post": {
"summary": "Stream MCP chat completions with reasoning, tool calls, and results",

View File

@@ -1201,43 +1201,55 @@ paths:
post:
consumes:
- multipart/form-data
- application/json
description: Perform image inpainting. Accepts multipart/form-data with `image`
and `mask` files.
parameters:
- in: formData
- description: Model identifier
in: formData
name: model
type: string
description: Model name (eg. dreamshaper-8-inpainting)
required: true
- in: formData
type: string
- description: Text prompt guiding the generation
in: formData
name: prompt
required: true
type: string
description: Positive prompt text
required: true
- in: formData
name: image
type: file
description: Source image (PNG/JPEG)
required: true
- in: formData
name: mask
type: file
description: Mask image (PNG). White=keep, Black=replace (or as backend expects)
required: true
- in: formData
- description: Number of inference steps (default 25)
in: formData
name: steps
type: integer
description: Number of inference steps
- in: body
name: request
description: "Alternative JSON payload with base64 fields: { image: '<b64>', mask: '<b64>', model, prompt }"
schema:
$ref: '#/definitions/schema.OpenAIRequest'
- description: Original image file
in: formData
name: image
required: true
type: file
- description: Mask image file (white = area to inpaint)
in: formData
name: mask
required: true
type: file
produces:
- application/json
responses:
"200":
description: Successful inpainting
description: OK
schema:
$ref: '#/definitions/schema.OpenAIResponse'
summary: Creates an inpainted image given an image + mask + prompt.
"400":
description: Bad Request
schema:
additionalProperties:
type: string
type: object
"500":
description: Internal Server Error
schema:
additionalProperties:
type: string
type: object
summary: Image inpainting
tags:
- images
/v1/mcp/chat/completions:
post:
parameters: