Skip to content

Commit 0672808

Browse files
feat(client): allow passing NotGiven for body (#2135)
fix(client): mark some request bodies as optional
1 parent a2736df commit 0672808

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/openai/_base_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ def _build_request(
519519
# so that passing a `TypedDict` doesn't cause an error.
520520
# https://github.com/microsoft/pyright/issues/3526#event-6715453066
521521
params=self.qs.stringify(cast(Mapping[str, Any], params)) if params else None,
522-
json=json_data,
522+
json=json_data if is_given(json_data) else None,
523523
files=files,
524524
**kwargs,
525525
)

0 commit comments

Comments
 (0)