From e7a040125795feb0ba5cb73753f0eb5e1f636fd4 Mon Sep 17 00:00:00 2001 From: sawradip Date: Wed, 5 Jun 2024 18:17:33 +0600 Subject: [PATCH] Added fallback type str --- composio/utils/shared.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/composio/utils/shared.py b/composio/utils/shared.py index 03324d6f6d..2f2b19baca 100644 --- a/composio/utils/shared.py +++ b/composio/utils/shared.py @@ -43,7 +43,9 @@ def json_schema_to_pydantic_type( :param json_schema: The JSON schema to convert. :return: A Pydantic type. """ - + # Add fallback type - string + if "type" not in json_schema: + json_schema["type"] = "string" type_ = t.cast(str, json_schema.get("type")) if type_ == "array": items_schema = json_schema.get("items")