feat(swagger): update swagger (#2302)

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] 2024-05-12 23:00:18 +02:00 committed by GitHub
parent 5b79bd04a7
commit 5534b13903
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 146 additions and 24 deletions

View file

@ -269,18 +269,40 @@ const docTemplate = `{
}
}
},
"functions.Item": {
"functions.FunctionProperties": {
"type": "object",
"properties": {
"arguments": {
"$ref": "#/definitions/functions.Argument"
},
"function": {
"$ref": "#/definitions/functions.FunctionName"
}
}
},
"functions.ItemFunction": {
"type": "object",
"properties": {
"properties": {
"$ref": "#/definitions/functions.Properties"
"$ref": "#/definitions/functions.FunctionProperties"
},
"type": {
"type": "string"
}
}
},
"functions.JSONFunctionStructure": {
"functions.ItemName": {
"type": "object",
"properties": {
"properties": {
"$ref": "#/definitions/functions.NameProperties"
},
"type": {
"type": "string"
}
}
},
"functions.JSONFunctionStructureFunction": {
"type": "object",
"properties": {
"$defs": {
@ -290,24 +312,45 @@ const docTemplate = `{
"anyOf": {
"type": "array",
"items": {
"$ref": "#/definitions/functions.Item"
"$ref": "#/definitions/functions.ItemFunction"
}
},
"oneOf": {
"type": "array",
"items": {
"$ref": "#/definitions/functions.Item"
"$ref": "#/definitions/functions.ItemFunction"
}
}
}
},
"functions.Properties": {
"functions.JSONFunctionStructureName": {
"type": "object",
"properties": {
"$defs": {
"type": "object",
"additionalProperties": true
},
"anyOf": {
"type": "array",
"items": {
"$ref": "#/definitions/functions.ItemName"
}
},
"oneOf": {
"type": "array",
"items": {
"$ref": "#/definitions/functions.ItemName"
}
}
}
},
"functions.NameProperties": {
"type": "object",
"properties": {
"arguments": {
"$ref": "#/definitions/functions.Argument"
},
"function": {
"name": {
"$ref": "#/definitions/functions.FunctionName"
}
}
@ -572,7 +615,10 @@ const docTemplate = `{
"type": "string"
},
"grammar_json_functions": {
"$ref": "#/definitions/functions.JSONFunctionStructure"
"$ref": "#/definitions/functions.JSONFunctionStructureFunction"
},
"grammar_json_name": {
"$ref": "#/definitions/functions.JSONFunctionStructureName"
},
"ignore_eos": {
"type": "boolean"