mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-04 09:42:53 +00:00
feat(swagger): update swagger (#2908)
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
96f67efe32
commit
919e2e4369
355
swagger/docs.go
355
swagger/docs.go
@ -51,6 +51,64 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/backend/monitor": {
|
||||||
|
"get": {
|
||||||
|
"summary": "Backend monitor endpoint",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "Backend statistics request",
|
||||||
|
"name": "request",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/schema.BackendMonitorRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Response",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/proto.StatusResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/backend/shutdown": {
|
||||||
|
"post": {
|
||||||
|
"summary": "Backend monitor endpoint",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "Backend statistics request",
|
||||||
|
"name": "request",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/schema.BackendMonitorRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/metrics": {
|
||||||
|
"get": {
|
||||||
|
"summary": "Prometheus metrics endpoint",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "Gallery details",
|
||||||
|
"name": "request",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/config.Gallery"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/models/apply": {
|
"/models/apply": {
|
||||||
"post": {
|
"post": {
|
||||||
"summary": "Install models to LocalAI.",
|
"summary": "Install models to LocalAI.",
|
||||||
@ -179,6 +237,35 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/models/jobs": {
|
||||||
|
"get": {
|
||||||
|
"summary": "Returns all the jobs status progress",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Response",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {
|
||||||
|
"$ref": "#/definitions/gallery.GalleryOpStatus"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/models/jobs/{uuid}": {
|
||||||
|
"get": {
|
||||||
|
"summary": "Returns the job status",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Response",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/gallery.GalleryOpStatus"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/tts": {
|
"/tts": {
|
||||||
"post": {
|
"post": {
|
||||||
"consumes": [
|
"consumes": [
|
||||||
@ -210,6 +297,46 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/v1/assistants": {
|
"/v1/assistants": {
|
||||||
|
"get": {
|
||||||
|
"summary": "List available assistents",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Limit the number of assistants returned",
|
||||||
|
"name": "limit",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "Order of assistants returned",
|
||||||
|
"name": "order",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "Return assistants created after the given ID",
|
||||||
|
"name": "after",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "Return assistants created before the given ID",
|
||||||
|
"name": "before",
|
||||||
|
"in": "query"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Response",
|
||||||
|
"schema": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/openai.Assistant"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"post": {
|
"post": {
|
||||||
"summary": "Create an assistant with a model and instructions.",
|
"summary": "Create an assistant with a model and instructions.",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@ -233,6 +360,30 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/v1/assistants/{assistant_id}": {
|
||||||
|
"get": {
|
||||||
|
"summary": "Get assistent data",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Response",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/openai.Assistant"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"delete": {
|
||||||
|
"summary": "Delete assistents",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Response",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/schema.DeleteAssistantResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/v1/audio/speech": {
|
"/v1/audio/speech": {
|
||||||
"post": {
|
"post": {
|
||||||
"consumes": [
|
"consumes": [
|
||||||
@ -346,6 +497,30 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/v1/edits": {
|
||||||
|
"post": {
|
||||||
|
"summary": "OpenAI edit endpoint",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "query params",
|
||||||
|
"name": "request",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/schema.OpenAIRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Response",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/schema.OpenAIResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/v1/embeddings": {
|
"/v1/embeddings": {
|
||||||
"post": {
|
"post": {
|
||||||
"summary": "Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.",
|
"summary": "Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.",
|
||||||
@ -370,6 +545,19 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/v1/files": {
|
||||||
|
"get": {
|
||||||
|
"summary": "List files.",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Response",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/schema.ListFiles"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/v1/files/{file_id}": {
|
"/v1/files/{file_id}": {
|
||||||
"get": {
|
"get": {
|
||||||
"summary": "Returns information about a specific file.",
|
"summary": "Returns information about a specific file.",
|
||||||
@ -377,7 +565,7 @@ const docTemplate = `{
|
|||||||
"200": {
|
"200": {
|
||||||
"description": "Response",
|
"description": "Response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/openai.File"
|
"$ref": "#/definitions/schema.File"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -719,6 +907,37 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"gallery.GalleryOpStatus": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"deletion": {
|
||||||
|
"description": "Deletion is true if the operation is a deletion",
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"downloaded_size": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"error": {},
|
||||||
|
"file_name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"file_size": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"gallery_model_name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"message": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"processed": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"progress": {
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"localai.GalleryModel": {
|
"localai.GalleryModel": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -889,35 +1108,6 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"openai.File": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"bytes": {
|
|
||||||
"description": "Size of the file in bytes",
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"created_at": {
|
|
||||||
"description": "The time at which the file was created",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"filename": {
|
|
||||||
"description": "The name of the file",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"description": "Unique identifier for the file",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"object": {
|
|
||||||
"description": "Type of the object (e.g., \"file\")",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"purpose": {
|
|
||||||
"description": "The purpose of the file (e.g., \"fine-tune\", \"classifications\", etc.)",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"openai.Tool": {
|
"openai.Tool": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -956,6 +1146,54 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"proto.MemoryUsageData": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"breakdown": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"total": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"proto.StatusResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"memory": {
|
||||||
|
"$ref": "#/definitions/proto.MemoryUsageData"
|
||||||
|
},
|
||||||
|
"state": {
|
||||||
|
"$ref": "#/definitions/proto.StatusResponse_State"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"proto.StatusResponse_State": {
|
||||||
|
"type": "integer",
|
||||||
|
"enum": [
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
-1
|
||||||
|
],
|
||||||
|
"x-enum-varnames": [
|
||||||
|
"StatusResponse_UNINITIALIZED",
|
||||||
|
"StatusResponse_BUSY",
|
||||||
|
"StatusResponse_READY",
|
||||||
|
"StatusResponse_ERROR"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"schema.BackendMonitorRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"model": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"schema.Choice": {
|
"schema.Choice": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -976,6 +1214,49 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"schema.DeleteAssistantResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"deleted": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"object": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"schema.File": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"bytes": {
|
||||||
|
"description": "Size of the file in bytes",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"created_at": {
|
||||||
|
"description": "The time at which the file was created",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"filename": {
|
||||||
|
"description": "The name of the file",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"description": "Unique identifier for the file",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"object": {
|
||||||
|
"description": "Type of the object (e.g., \"file\")",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"purpose": {
|
||||||
|
"description": "The purpose of the file (e.g., \"fine-tune\", \"classifications\", etc.)",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"schema.FunctionCall": {
|
"schema.FunctionCall": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -1092,6 +1373,20 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"schema.ListFiles": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/schema.File"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"object": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"schema.Message": {
|
"schema.Message": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -44,6 +44,64 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/backend/monitor": {
|
||||||
|
"get": {
|
||||||
|
"summary": "Backend monitor endpoint",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "Backend statistics request",
|
||||||
|
"name": "request",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/schema.BackendMonitorRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Response",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/proto.StatusResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/backend/shutdown": {
|
||||||
|
"post": {
|
||||||
|
"summary": "Backend monitor endpoint",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "Backend statistics request",
|
||||||
|
"name": "request",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/schema.BackendMonitorRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/metrics": {
|
||||||
|
"get": {
|
||||||
|
"summary": "Prometheus metrics endpoint",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "Gallery details",
|
||||||
|
"name": "request",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/config.Gallery"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/models/apply": {
|
"/models/apply": {
|
||||||
"post": {
|
"post": {
|
||||||
"summary": "Install models to LocalAI.",
|
"summary": "Install models to LocalAI.",
|
||||||
@ -172,6 +230,35 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/models/jobs": {
|
||||||
|
"get": {
|
||||||
|
"summary": "Returns all the jobs status progress",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Response",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {
|
||||||
|
"$ref": "#/definitions/gallery.GalleryOpStatus"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/models/jobs/{uuid}": {
|
||||||
|
"get": {
|
||||||
|
"summary": "Returns the job status",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Response",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/gallery.GalleryOpStatus"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/tts": {
|
"/tts": {
|
||||||
"post": {
|
"post": {
|
||||||
"consumes": [
|
"consumes": [
|
||||||
@ -203,6 +290,46 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/v1/assistants": {
|
"/v1/assistants": {
|
||||||
|
"get": {
|
||||||
|
"summary": "List available assistents",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Limit the number of assistants returned",
|
||||||
|
"name": "limit",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "Order of assistants returned",
|
||||||
|
"name": "order",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "Return assistants created after the given ID",
|
||||||
|
"name": "after",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "Return assistants created before the given ID",
|
||||||
|
"name": "before",
|
||||||
|
"in": "query"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Response",
|
||||||
|
"schema": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/openai.Assistant"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"post": {
|
"post": {
|
||||||
"summary": "Create an assistant with a model and instructions.",
|
"summary": "Create an assistant with a model and instructions.",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@ -226,6 +353,30 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/v1/assistants/{assistant_id}": {
|
||||||
|
"get": {
|
||||||
|
"summary": "Get assistent data",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Response",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/openai.Assistant"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"delete": {
|
||||||
|
"summary": "Delete assistents",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Response",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/schema.DeleteAssistantResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/v1/audio/speech": {
|
"/v1/audio/speech": {
|
||||||
"post": {
|
"post": {
|
||||||
"consumes": [
|
"consumes": [
|
||||||
@ -339,6 +490,30 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/v1/edits": {
|
||||||
|
"post": {
|
||||||
|
"summary": "OpenAI edit endpoint",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "query params",
|
||||||
|
"name": "request",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/schema.OpenAIRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Response",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/schema.OpenAIResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/v1/embeddings": {
|
"/v1/embeddings": {
|
||||||
"post": {
|
"post": {
|
||||||
"summary": "Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.",
|
"summary": "Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.",
|
||||||
@ -363,6 +538,19 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/v1/files": {
|
||||||
|
"get": {
|
||||||
|
"summary": "List files.",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Response",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/schema.ListFiles"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/v1/files/{file_id}": {
|
"/v1/files/{file_id}": {
|
||||||
"get": {
|
"get": {
|
||||||
"summary": "Returns information about a specific file.",
|
"summary": "Returns information about a specific file.",
|
||||||
@ -370,7 +558,7 @@
|
|||||||
"200": {
|
"200": {
|
||||||
"description": "Response",
|
"description": "Response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/openai.File"
|
"$ref": "#/definitions/schema.File"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -712,6 +900,37 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"gallery.GalleryOpStatus": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"deletion": {
|
||||||
|
"description": "Deletion is true if the operation is a deletion",
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"downloaded_size": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"error": {},
|
||||||
|
"file_name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"file_size": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"gallery_model_name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"message": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"processed": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"progress": {
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"localai.GalleryModel": {
|
"localai.GalleryModel": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -882,35 +1101,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"openai.File": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"bytes": {
|
|
||||||
"description": "Size of the file in bytes",
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"created_at": {
|
|
||||||
"description": "The time at which the file was created",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"filename": {
|
|
||||||
"description": "The name of the file",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"description": "Unique identifier for the file",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"object": {
|
|
||||||
"description": "Type of the object (e.g., \"file\")",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"purpose": {
|
|
||||||
"description": "The purpose of the file (e.g., \"fine-tune\", \"classifications\", etc.)",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"openai.Tool": {
|
"openai.Tool": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -949,6 +1139,54 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"proto.MemoryUsageData": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"breakdown": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"total": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"proto.StatusResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"memory": {
|
||||||
|
"$ref": "#/definitions/proto.MemoryUsageData"
|
||||||
|
},
|
||||||
|
"state": {
|
||||||
|
"$ref": "#/definitions/proto.StatusResponse_State"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"proto.StatusResponse_State": {
|
||||||
|
"type": "integer",
|
||||||
|
"enum": [
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
-1
|
||||||
|
],
|
||||||
|
"x-enum-varnames": [
|
||||||
|
"StatusResponse_UNINITIALIZED",
|
||||||
|
"StatusResponse_BUSY",
|
||||||
|
"StatusResponse_READY",
|
||||||
|
"StatusResponse_ERROR"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"schema.BackendMonitorRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"model": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"schema.Choice": {
|
"schema.Choice": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -969,6 +1207,49 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"schema.DeleteAssistantResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"deleted": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"object": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"schema.File": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"bytes": {
|
||||||
|
"description": "Size of the file in bytes",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"created_at": {
|
||||||
|
"description": "The time at which the file was created",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"filename": {
|
||||||
|
"description": "The name of the file",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"description": "Unique identifier for the file",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"object": {
|
||||||
|
"description": "Type of the object (e.g., \"file\")",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"purpose": {
|
||||||
|
"description": "The purpose of the file (e.g., \"fine-tune\", \"classifications\", etc.)",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"schema.FunctionCall": {
|
"schema.FunctionCall": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -1085,6 +1366,20 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"schema.ListFiles": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/schema.File"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"object": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"schema.Message": {
|
"schema.Message": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -145,6 +145,27 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
type: array
|
type: array
|
||||||
type: object
|
type: object
|
||||||
|
gallery.GalleryOpStatus:
|
||||||
|
properties:
|
||||||
|
deletion:
|
||||||
|
description: Deletion is true if the operation is a deletion
|
||||||
|
type: boolean
|
||||||
|
downloaded_size:
|
||||||
|
type: string
|
||||||
|
error: {}
|
||||||
|
file_name:
|
||||||
|
type: string
|
||||||
|
file_size:
|
||||||
|
type: string
|
||||||
|
gallery_model_name:
|
||||||
|
type: string
|
||||||
|
message:
|
||||||
|
type: string
|
||||||
|
processed:
|
||||||
|
type: boolean
|
||||||
|
progress:
|
||||||
|
type: number
|
||||||
|
type: object
|
||||||
localai.GalleryModel:
|
localai.GalleryModel:
|
||||||
properties:
|
properties:
|
||||||
config_file:
|
config_file:
|
||||||
@ -263,28 +284,6 @@ definitions:
|
|||||||
object:
|
object:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
openai.File:
|
|
||||||
properties:
|
|
||||||
bytes:
|
|
||||||
description: Size of the file in bytes
|
|
||||||
type: integer
|
|
||||||
created_at:
|
|
||||||
description: The time at which the file was created
|
|
||||||
type: string
|
|
||||||
filename:
|
|
||||||
description: The name of the file
|
|
||||||
type: string
|
|
||||||
id:
|
|
||||||
description: Unique identifier for the file
|
|
||||||
type: string
|
|
||||||
object:
|
|
||||||
description: Type of the object (e.g., "file")
|
|
||||||
type: string
|
|
||||||
purpose:
|
|
||||||
description: The purpose of the file (e.g., "fine-tune", "classifications",
|
|
||||||
etc.)
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
openai.Tool:
|
openai.Tool:
|
||||||
properties:
|
properties:
|
||||||
type:
|
type:
|
||||||
@ -311,6 +310,39 @@ definitions:
|
|||||||
tunnelAddress:
|
tunnelAddress:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
|
proto.MemoryUsageData:
|
||||||
|
properties:
|
||||||
|
breakdown:
|
||||||
|
additionalProperties:
|
||||||
|
type: integer
|
||||||
|
type: object
|
||||||
|
total:
|
||||||
|
type: integer
|
||||||
|
type: object
|
||||||
|
proto.StatusResponse:
|
||||||
|
properties:
|
||||||
|
memory:
|
||||||
|
$ref: '#/definitions/proto.MemoryUsageData'
|
||||||
|
state:
|
||||||
|
$ref: '#/definitions/proto.StatusResponse_State'
|
||||||
|
type: object
|
||||||
|
proto.StatusResponse_State:
|
||||||
|
enum:
|
||||||
|
- 0
|
||||||
|
- 1
|
||||||
|
- 2
|
||||||
|
- -1
|
||||||
|
type: integer
|
||||||
|
x-enum-varnames:
|
||||||
|
- StatusResponse_UNINITIALIZED
|
||||||
|
- StatusResponse_BUSY
|
||||||
|
- StatusResponse_READY
|
||||||
|
- StatusResponse_ERROR
|
||||||
|
schema.BackendMonitorRequest:
|
||||||
|
properties:
|
||||||
|
model:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
schema.Choice:
|
schema.Choice:
|
||||||
properties:
|
properties:
|
||||||
delta:
|
delta:
|
||||||
@ -324,6 +356,37 @@ definitions:
|
|||||||
text:
|
text:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
|
schema.DeleteAssistantResponse:
|
||||||
|
properties:
|
||||||
|
deleted:
|
||||||
|
type: boolean
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
object:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
schema.File:
|
||||||
|
properties:
|
||||||
|
bytes:
|
||||||
|
description: Size of the file in bytes
|
||||||
|
type: integer
|
||||||
|
created_at:
|
||||||
|
description: The time at which the file was created
|
||||||
|
type: string
|
||||||
|
filename:
|
||||||
|
description: The name of the file
|
||||||
|
type: string
|
||||||
|
id:
|
||||||
|
description: Unique identifier for the file
|
||||||
|
type: string
|
||||||
|
object:
|
||||||
|
description: Type of the object (e.g., "file")
|
||||||
|
type: string
|
||||||
|
purpose:
|
||||||
|
description: The purpose of the file (e.g., "fine-tune", "classifications",
|
||||||
|
etc.)
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
schema.FunctionCall:
|
schema.FunctionCall:
|
||||||
properties:
|
properties:
|
||||||
arguments:
|
arguments:
|
||||||
@ -399,6 +462,15 @@ definitions:
|
|||||||
total_tokens:
|
total_tokens:
|
||||||
type: integer
|
type: integer
|
||||||
type: object
|
type: object
|
||||||
|
schema.ListFiles:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/schema.File'
|
||||||
|
type: array
|
||||||
|
object:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
schema.Message:
|
schema.Message:
|
||||||
properties:
|
properties:
|
||||||
content:
|
content:
|
||||||
@ -656,6 +728,43 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
summary: Show the P2P token
|
summary: Show the P2P token
|
||||||
|
/backend/monitor:
|
||||||
|
get:
|
||||||
|
parameters:
|
||||||
|
- description: Backend statistics request
|
||||||
|
in: body
|
||||||
|
name: request
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/schema.BackendMonitorRequest'
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Response
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/proto.StatusResponse'
|
||||||
|
summary: Backend monitor endpoint
|
||||||
|
/backend/shutdown:
|
||||||
|
post:
|
||||||
|
parameters:
|
||||||
|
- description: Backend statistics request
|
||||||
|
in: body
|
||||||
|
name: request
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/schema.BackendMonitorRequest'
|
||||||
|
responses: {}
|
||||||
|
summary: Backend monitor endpoint
|
||||||
|
/metrics:
|
||||||
|
get:
|
||||||
|
parameters:
|
||||||
|
- description: Gallery details
|
||||||
|
in: body
|
||||||
|
name: request
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/config.Gallery'
|
||||||
|
responses: {}
|
||||||
|
summary: Prometheus metrics endpoint
|
||||||
/models/apply:
|
/models/apply:
|
||||||
post:
|
post:
|
||||||
parameters:
|
parameters:
|
||||||
@ -737,6 +846,24 @@ paths:
|
|||||||
$ref: '#/definitions/config.Gallery'
|
$ref: '#/definitions/config.Gallery'
|
||||||
type: array
|
type: array
|
||||||
summary: Adds a gallery in LocalAI
|
summary: Adds a gallery in LocalAI
|
||||||
|
/models/jobs:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Response
|
||||||
|
schema:
|
||||||
|
additionalProperties:
|
||||||
|
$ref: '#/definitions/gallery.GalleryOpStatus'
|
||||||
|
type: object
|
||||||
|
summary: Returns all the jobs status progress
|
||||||
|
/models/jobs/{uuid}:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Response
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/gallery.GalleryOpStatus'
|
||||||
|
summary: Returns the job status
|
||||||
/tts:
|
/tts:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
@ -757,6 +884,32 @@ paths:
|
|||||||
type: string
|
type: string
|
||||||
summary: Generates audio from the input text.
|
summary: Generates audio from the input text.
|
||||||
/v1/assistants:
|
/v1/assistants:
|
||||||
|
get:
|
||||||
|
parameters:
|
||||||
|
- description: Limit the number of assistants returned
|
||||||
|
in: query
|
||||||
|
name: limit
|
||||||
|
type: integer
|
||||||
|
- description: Order of assistants returned
|
||||||
|
in: query
|
||||||
|
name: order
|
||||||
|
type: string
|
||||||
|
- description: Return assistants created after the given ID
|
||||||
|
in: query
|
||||||
|
name: after
|
||||||
|
type: string
|
||||||
|
- description: Return assistants created before the given ID
|
||||||
|
in: query
|
||||||
|
name: before
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Response
|
||||||
|
schema:
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/openai.Assistant'
|
||||||
|
type: array
|
||||||
|
summary: List available assistents
|
||||||
post:
|
post:
|
||||||
parameters:
|
parameters:
|
||||||
- description: query params
|
- description: query params
|
||||||
@ -771,6 +924,21 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/openai.Assistant'
|
$ref: '#/definitions/openai.Assistant'
|
||||||
summary: Create an assistant with a model and instructions.
|
summary: Create an assistant with a model and instructions.
|
||||||
|
/v1/assistants/{assistant_id}:
|
||||||
|
delete:
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Response
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/schema.DeleteAssistantResponse'
|
||||||
|
summary: Delete assistents
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Response
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/openai.Assistant'
|
||||||
|
summary: Get assistent data
|
||||||
/v1/audio/speech:
|
/v1/audio/speech:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
@ -843,6 +1011,21 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/schema.OpenAIResponse'
|
$ref: '#/definitions/schema.OpenAIResponse'
|
||||||
summary: Generate completions for a given prompt and model.
|
summary: Generate completions for a given prompt and model.
|
||||||
|
/v1/edits:
|
||||||
|
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: OpenAI edit endpoint
|
||||||
/v1/embeddings:
|
/v1/embeddings:
|
||||||
post:
|
post:
|
||||||
parameters:
|
parameters:
|
||||||
@ -859,6 +1042,14 @@ paths:
|
|||||||
$ref: '#/definitions/schema.OpenAIResponse'
|
$ref: '#/definitions/schema.OpenAIResponse'
|
||||||
summary: Get a vector representation of a given input that can be easily consumed
|
summary: Get a vector representation of a given input that can be easily consumed
|
||||||
by machine learning models and algorithms.
|
by machine learning models and algorithms.
|
||||||
|
/v1/files:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Response
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/schema.ListFiles'
|
||||||
|
summary: List files.
|
||||||
/v1/files/{file_id}:
|
/v1/files/{file_id}:
|
||||||
delete:
|
delete:
|
||||||
responses:
|
responses:
|
||||||
@ -872,7 +1063,7 @@ paths:
|
|||||||
"200":
|
"200":
|
||||||
description: Response
|
description: Response
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/openai.File'
|
$ref: '#/definitions/schema.File'
|
||||||
summary: Returns information about a specific file.
|
summary: Returns information about a specific file.
|
||||||
/v1/files/{file_id}/content:
|
/v1/files/{file_id}/content:
|
||||||
get:
|
get:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user