Skip to content

Commit

Permalink
chore: add missing isclass check for structured outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertCraigie committed Jan 6, 2025
1 parent 1e07c9d commit bcbf013
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/openai/lib/_pydantic.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ def resolve_ref(*, root: dict[str, object], ref: str) -> object:


def is_basemodel_type(typ: type) -> TypeGuard[type[pydantic.BaseModel]]:
if not inspect.isclass(typ):
return False
return issubclass(typ, pydantic.BaseModel)


Expand Down

0 comments on commit bcbf013

Please sign in to comment.