From 025f0f390edfb5ae74c576ec52943d47eef81a3f Mon Sep 17 00:00:00 2001 From: Peter De-Ath Date: Tue, 27 Aug 2024 21:33:26 +0100 Subject: [PATCH] refac: support list in json schema to pydantic --- backend/utils/schemas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/utils/schemas.py b/backend/utils/schemas.py index 09b24897b..452f95bc7 100644 --- a/backend/utils/schemas.py +++ b/backend/utils/schemas.py @@ -83,7 +83,7 @@ def json_schema_to_pydantic_type(json_schema: dict[str, Any]) -> Any: return float elif type_ == "boolean" or type_ == "bool": return bool - elif type_ == "array": + elif type_ == "array" or type_ == "list": items_schema = json_schema.get("items") if items_schema: item_type = json_schema_to_pydantic_type(items_schema)