From 48bf052d76298571e0b1c76d5c377b88c1c48a71 Mon Sep 17 00:00:00 2001 From: yinjiaqi Date: Mon, 16 Dec 2024 16:05:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0Test=E5=AF=B9Json=20schema?= =?UTF-8?q?=E7=9A=84=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- python/tests/component_schemas.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/python/tests/component_schemas.py b/python/tests/component_schemas.py index 58a42779..5f70bdaa 100644 --- a/python/tests/component_schemas.py +++ b/python/tests/component_schemas.py @@ -245,6 +245,21 @@ "required": ["filename", "url"] } +json_schema = copy.deepcopy(base_item_schema) +json_schema["$schema"] = "json_schema" +json_schema["properties"]["type"] = { + "type": "string", + "enum": ["json"] +} +json_schema["properties"]["text"] = { + "type": "object", + "properties": { + "data": { + "type": "string" + } + }, + "required": ["data"] +} plan_schema = copy.deepcopy(base_item_schema) plan_schema["$schema"] = "plan_schema" @@ -311,6 +326,7 @@ "image": image_schema, "chart": chart_schema, "audio": audio_schema, + "json": json_schema, "plan": plan_schema, "function_call": function_call_schema, } \ No newline at end of file