From 7b0dd05a8c9a0f93b65674e9fb616cafeb4150f5 Mon Sep 17 00:00:00 2001 From: Stainless Bot Date: Thu, 20 Feb 2025 22:37:43 +0000 Subject: [PATCH] feat(client): allow passing `NotGiven` for body fix(client): mark some request bodies as optional --- src/openai/_base_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openai/_base_client.py b/src/openai/_base_client.py index 803b9a8dbc..9ca6e0a045 100644 --- a/src/openai/_base_client.py +++ b/src/openai/_base_client.py @@ -519,7 +519,7 @@ def _build_request( # so that passing a `TypedDict` doesn't cause an error. # https://github.com/microsoft/pyright/issues/3526#event-6715453066 params=self.qs.stringify(cast(Mapping[str, Any], params)) if params else None, - json=json_data, + json=json_data if is_given(json_data) else None, files=files, **kwargs, )