From 4ae4e4450697ae3ff51f159fee4eeab83aeb08c4 Mon Sep 17 00:00:00 2001 From: "LocalAI [bot]" <139863280+localai-bot@users.noreply.github.com> Date: Thu, 25 Apr 2024 16:10:08 +0200 Subject: [PATCH] feat(swagger): update swagger (#2128) Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com> --- swagger/docs.go | 35 +++++++++++++++++------------------ swagger/swagger.json | 32 ++++++++++++++++---------------- swagger/swagger.yaml | 32 ++++++++++++++++---------------- 3 files changed, 49 insertions(+), 50 deletions(-) diff --git a/swagger/docs.go b/swagger/docs.go index e0199673..cc4fe085 100644 --- a/swagger/docs.go +++ b/swagger/docs.go @@ -1,5 +1,4 @@ -// Code generated by swaggo/swag. DO NOT EDIT. - +// Package swagger Code generated by swaggo/swag. DO NOT EDIT package swagger import "github.com/swaggo/swag" @@ -235,7 +234,7 @@ const docTemplate = `{ } }, "definitions": { - "grammar.Argument": { + "functions.Argument": { "type": "object", "properties": { "properties": { @@ -247,7 +246,7 @@ const docTemplate = `{ } } }, - "grammar.Function": { + "functions.Function": { "type": "object", "properties": { "description": { @@ -262,7 +261,7 @@ const docTemplate = `{ } } }, - "grammar.FunctionName": { + "functions.FunctionName": { "type": "object", "properties": { "const": { @@ -270,18 +269,18 @@ const docTemplate = `{ } } }, - "grammar.Item": { + "functions.Item": { "type": "object", "properties": { "properties": { - "$ref": "#/definitions/grammar.Properties" + "$ref": "#/definitions/functions.Properties" }, "type": { "type": "string" } } }, - "grammar.JSONFunctionStructure": { + "functions.JSONFunctionStructure": { "type": "object", "properties": { "$defs": { @@ -291,33 +290,33 @@ const docTemplate = `{ "anyOf": { "type": "array", "items": { - "$ref": "#/definitions/grammar.Item" + "$ref": "#/definitions/functions.Item" } }, "oneOf": { "type": "array", "items": { - "$ref": "#/definitions/grammar.Item" + "$ref": "#/definitions/functions.Item" } } } }, - "grammar.Properties": { + "functions.Properties": { "type": "object", "properties": { "arguments": { - "$ref": "#/definitions/grammar.Argument" + "$ref": "#/definitions/functions.Argument" }, "function": { - "$ref": "#/definitions/grammar.FunctionName" + "$ref": "#/definitions/functions.FunctionName" } } }, - "grammar.Tool": { + "functions.Tool": { "type": "object", "properties": { "function": { - "$ref": "#/definitions/grammar.Function" + "$ref": "#/definitions/functions.Function" }, "type": { "type": "string" @@ -565,7 +564,7 @@ const docTemplate = `{ "description": "A list of available functions to call", "type": "array", "items": { - "$ref": "#/definitions/grammar.Function" + "$ref": "#/definitions/functions.Function" } }, "grammar": { @@ -573,7 +572,7 @@ const docTemplate = `{ "type": "string" }, "grammar_json_functions": { - "$ref": "#/definitions/grammar.JSONFunctionStructure" + "$ref": "#/definitions/functions.JSONFunctionStructure" }, "ignore_eos": { "type": "boolean" @@ -673,7 +672,7 @@ const docTemplate = `{ "tools": { "type": "array", "items": { - "$ref": "#/definitions/grammar.Tool" + "$ref": "#/definitions/functions.Tool" } }, "top_k": { diff --git a/swagger/swagger.json b/swagger/swagger.json index 4d7102c4..d7febeb3 100644 --- a/swagger/swagger.json +++ b/swagger/swagger.json @@ -227,7 +227,7 @@ } }, "definitions": { - "grammar.Argument": { + "functions.Argument": { "type": "object", "properties": { "properties": { @@ -239,7 +239,7 @@ } } }, - "grammar.Function": { + "functions.Function": { "type": "object", "properties": { "description": { @@ -254,7 +254,7 @@ } } }, - "grammar.FunctionName": { + "functions.FunctionName": { "type": "object", "properties": { "const": { @@ -262,18 +262,18 @@ } } }, - "grammar.Item": { + "functions.Item": { "type": "object", "properties": { "properties": { - "$ref": "#/definitions/grammar.Properties" + "$ref": "#/definitions/functions.Properties" }, "type": { "type": "string" } } }, - "grammar.JSONFunctionStructure": { + "functions.JSONFunctionStructure": { "type": "object", "properties": { "$defs": { @@ -283,33 +283,33 @@ "anyOf": { "type": "array", "items": { - "$ref": "#/definitions/grammar.Item" + "$ref": "#/definitions/functions.Item" } }, "oneOf": { "type": "array", "items": { - "$ref": "#/definitions/grammar.Item" + "$ref": "#/definitions/functions.Item" } } } }, - "grammar.Properties": { + "functions.Properties": { "type": "object", "properties": { "arguments": { - "$ref": "#/definitions/grammar.Argument" + "$ref": "#/definitions/functions.Argument" }, "function": { - "$ref": "#/definitions/grammar.FunctionName" + "$ref": "#/definitions/functions.FunctionName" } } }, - "grammar.Tool": { + "functions.Tool": { "type": "object", "properties": { "function": { - "$ref": "#/definitions/grammar.Function" + "$ref": "#/definitions/functions.Function" }, "type": { "type": "string" @@ -557,7 +557,7 @@ "description": "A list of available functions to call", "type": "array", "items": { - "$ref": "#/definitions/grammar.Function" + "$ref": "#/definitions/functions.Function" } }, "grammar": { @@ -565,7 +565,7 @@ "type": "string" }, "grammar_json_functions": { - "$ref": "#/definitions/grammar.JSONFunctionStructure" + "$ref": "#/definitions/functions.JSONFunctionStructure" }, "ignore_eos": { "type": "boolean" @@ -665,7 +665,7 @@ "tools": { "type": "array", "items": { - "$ref": "#/definitions/grammar.Tool" + "$ref": "#/definitions/functions.Tool" } }, "top_k": { diff --git a/swagger/swagger.yaml b/swagger/swagger.yaml index 86caff8a..919dd896 100644 --- a/swagger/swagger.yaml +++ b/swagger/swagger.yaml @@ -1,6 +1,6 @@ basePath: / definitions: - grammar.Argument: + functions.Argument: properties: properties: additionalProperties: true @@ -8,7 +8,7 @@ definitions: type: type: string type: object - grammar.Function: + functions.Function: properties: description: type: string @@ -18,43 +18,43 @@ definitions: additionalProperties: true type: object type: object - grammar.FunctionName: + functions.FunctionName: properties: const: type: string type: object - grammar.Item: + functions.Item: properties: properties: - $ref: '#/definitions/grammar.Properties' + $ref: '#/definitions/functions.Properties' type: type: string type: object - grammar.JSONFunctionStructure: + functions.JSONFunctionStructure: properties: $defs: additionalProperties: true type: object anyOf: items: - $ref: '#/definitions/grammar.Item' + $ref: '#/definitions/functions.Item' type: array oneOf: items: - $ref: '#/definitions/grammar.Item' + $ref: '#/definitions/functions.Item' type: array type: object - grammar.Properties: + functions.Properties: properties: arguments: - $ref: '#/definitions/grammar.Argument' + $ref: '#/definitions/functions.Argument' function: - $ref: '#/definitions/grammar.FunctionName' + $ref: '#/definitions/functions.FunctionName' type: object - grammar.Tool: + functions.Tool: properties: function: - $ref: '#/definitions/grammar.Function' + $ref: '#/definitions/functions.Function' type: type: string type: object @@ -221,13 +221,13 @@ definitions: functions: description: A list of available functions to call items: - $ref: '#/definitions/grammar.Function' + $ref: '#/definitions/functions.Function' type: array grammar: description: A grammar to constrain the LLM output type: string grammar_json_functions: - $ref: '#/definitions/grammar.JSONFunctionStructure' + $ref: '#/definitions/functions.JSONFunctionStructure' ignore_eos: type: boolean input: {} @@ -297,7 +297,7 @@ definitions: tool_choice: {} tools: items: - $ref: '#/definitions/grammar.Tool' + $ref: '#/definitions/functions.Tool' type: array top_k: type: integer