Skip to content

Commit

Permalink
更新Test对Json schema的检测 (#665)
Browse files Browse the repository at this point in the history
Co-authored-by: yinjiaqi <[email protected]>
  • Loading branch information
C9luster and yinjiaqi authored Dec 16, 2024
1 parent 574d169 commit 44e7327
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions python/tests/component_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -311,6 +326,7 @@
"image": image_schema,
"chart": chart_schema,
"audio": audio_schema,
"json": json_schema,
"plan": plan_schema,
"function_call": function_call_schema,
}

0 comments on commit 44e7327

Please sign in to comment.