added interrogate endpoint (+1 squashed commits)

Squashed commits:

[7bf96261] added interrogate endpoint
This commit is contained in:
Concedo 2024-03-11 18:28:23 +08:00
parent e4946b96ea
commit d59ec68753
3 changed files with 101 additions and 4 deletions

View file

@ -997,6 +997,60 @@
]
}
},
"/sdapi/v1/interrogate": {
"post": {
"description": "Generates a short text caption describing an image.",
"requestBody": {
"content": {
"application/json": {
"example": {
"image": "base64_image_data",
"model": "clip"
},
"schema": {
"properties": {
"image": {
"type": "string",
"description": "A base64 string containing the encoded PNG of the image."
},
"model": {
"type": "string",
"description": "Not used."
},
},
"type": "object"
}
}
},
"required": false
},
"responses": {
"200": {
"content": {
"application/json": {
"example":
{
"caption":"A picture of a white cottage with a flagpole."
},
"schema": {
"properties": {
"caption": {
"type": "string",
"description": "A short text description of the image."
}
}
}
}
},
"description": "Successful request"
}
},
"summary": "Generates a short text caption describing an image",
"tags": [
"sdapi/v1"
]
}
},
"/v1/completions": {
"post": {
"summary": "Generates text continuations given a prompt. Please refer to OpenAI documentation",