Skip to content

Commit 7cc9c9e

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/openai/_base_client.py

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

0 commit comments

Comments
 (0)