Skip to content

Commit bcbf013

Browse files
committed
chore: add missing isclass check for structured outputs
1 parent 1e07c9d commit bcbf013

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/openai/lib/_pydantic.py

+2
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ def resolve_ref(*, root: dict[str, object], ref: str) -> object:
127127

128128

129129
def is_basemodel_type(typ: type) -> TypeGuard[type[pydantic.BaseModel]]:
130+
if not inspect.isclass(typ):
131+
return False
130132
return issubclass(typ, pydantic.BaseModel)
131133

132134

0 commit comments

Comments
 (0)