Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 60ec9df

Browse filesBrowse files
RobertCraigiestainless-app[bot]
authored andcommitted
fix(responses): don't include parsed_arguments when re-serialising
1 parent 217f6d1 commit 60ec9df
Copy full SHA for 60ec9df

File tree

Expand file treeCollapse file tree

2 files changed

+3
-1
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-1
lines changed

‎src/openai/_utils/_transform.py

Copy file name to clipboardExpand all lines: src/openai/_utils/_transform.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def _transform_recursive(
212212
return data
213213

214214
if isinstance(data, pydantic.BaseModel):
215-
return model_dump(data, exclude_unset=True, mode="json")
215+
return model_dump(data, exclude_unset=True, mode="json", exclude=getattr(data, '__api_exclude__', None))
216216

217217
annotated_type = _get_annotated_type(annotation)
218218
if annotated_type is None:

‎src/openai/types/responses/parsed_response.py

Copy file name to clipboardExpand all lines: src/openai/types/responses/parsed_response.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ class ParsedResponseOutputMessage(ResponseOutputMessage, GenericModel, Generic[C
5555
class ParsedResponseFunctionToolCall(ResponseFunctionToolCall):
5656
parsed_arguments: object = None
5757

58+
__api_exclude__ = {'parsed_arguments'}
59+
5860

5961
ParsedResponseOutputItem: TypeAlias = Annotated[
6062
Union[

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.