Skip to content

Commit fa0a418

Browse files
authored
bug: Fix how input model (#13)
1 parent 3f699db commit fa0a418

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

unstructured_platform_plugins/schema/json_schema.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ def schema_to_base_model_type(json_type_name, name: str, type_info: dict) -> Typ
270270
return Path
271271
if t is dict and "properties" in type_info:
272272
t = schema_to_base_model(
273-
schema=type_info["properties"],
273+
schema=type_info,
274274
name=name,
275275
)
276276
if t is dict and "items" in type_info and isinstance(type_info["items"], dict):
@@ -305,7 +305,7 @@ def schema_to_base_model_type(json_type_name, name: str, type_info: dict) -> Typ
305305

306306
def schema_to_base_model(schema: dict, name: str = "reconstructed_model") -> Type[BaseModel]:
307307
inputs = {}
308-
properties = schema.get("properties", {})
308+
properties = schema["properties"]
309309

310310
for k, v in properties.items():
311311
optional = False

0 commit comments

Comments
 (0)