From 9224be00bbef9a89443c6a7f876f320746c0d4d1 Mon Sep 17 00:00:00 2001 From: Gabrielle Ong Date: Mon, 2 Dec 2024 18:42:46 +0800 Subject: [PATCH] docs: fix tools should be array not object --- docs/static/openapi/cortex.json | 39 ++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/docs/static/openapi/cortex.json b/docs/static/openapi/cortex.json index 78430294f..206ee381d 100644 --- a/docs/static/openapi/cortex.json +++ b/docs/static/openapi/cortex.json @@ -2224,8 +2224,18 @@ "default": [], "type": "array", "items": { - "type": "object" - } + "type": "array", + "properties": { + "type": { + "type": "string", + "enum": ["function"] + }, + "function": { + "$ref": "#/components/schemas/Function" + } + }, + "required": ["type", "function"] + }, }, "metadata": { "type": "object", @@ -2286,7 +2296,7 @@ "nullable": true }, "tools": { - "type": "object" + "type": "array" }, "metadata": { "type": "object", @@ -2869,17 +2879,20 @@ } }, "tools": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["function"] + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["function"] + }, + "function": { + "$ref": "#/components/schemas/Function" + } }, - "function": { - "$ref": "#/components/schemas/Function" - } - }, - "required": ["type", "function"] + "required": ["type", "function"] + } }, "tool_choice": { "anyOf": [