Skip to content

Commit

Permalink
chore(internal): update pydantic v1 compat helpers (#666)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Sep 23, 2024
1 parent 17c26d5 commit ee8e2bd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/anthropic/_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 ee8e2bd

Please sign in to comment.