浏览代码

refac: support list in json schema to pydantic

Peter De-Ath 8 月之前
父节点
当前提交
025f0f390e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      backend/utils/schemas.py

+ 1 - 1
backend/utils/schemas.py

@@ -83,7 +83,7 @@ def json_schema_to_pydantic_type(json_schema: dict[str, Any]) -> Any:
         return float
         return float
     elif type_ == "boolean" or type_ == "bool":
     elif type_ == "boolean" or type_ == "bool":
         return bool
         return bool
-    elif type_ == "array":
+    elif type_ == "array" or type_ == "list":
         items_schema = json_schema.get("items")
         items_schema = json_schema.get("items")
         if items_schema:
         if items_schema:
             item_type = json_schema_to_pydantic_type(items_schema)
             item_type = json_schema_to_pydantic_type(items_schema)