Skip to content

Commit

Permalink
Merge pull request #102 from SamparkAI/sawra/add_fallback_data_type
Browse files Browse the repository at this point in the history
Added fallback type string
  • Loading branch information
utkarsh-dixit authored Jun 5, 2024
2 parents 68dfb1f + e7a0401 commit a67e1c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion composio/utils/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit a67e1c7

Please sign in to comment.