Skip to content

Commit

Permalink
chore(internal): update pydantic v1 compat helpers (#504)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Sep 25, 2024
1 parent e677766 commit a01789a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/finch/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,14 @@ def model_dump(
exclude: IncEx = None,
exclude_unset: bool = False,
exclude_defaults: bool = False,
warnings: bool = True,
) -> dict[str, Any]:
if PYDANTIC_V2:
return model.model_dump(
exclude=exclude,
exclude_unset=exclude_unset,
exclude_defaults=exclude_defaults,
warnings=warnings,
)
return cast(
"dict[str, Any]",
Expand Down

0 comments on commit a01789a

Please sign in to comment.