Skip to content

Create to_json_dict for ModelSettings #582

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2025
Merged

Create to_json_dict for ModelSettings #582

merged 1 commit into from
Apr 24, 2025

Conversation

rm-openai
Copy link
Collaborator

@rm-openai rm-openai commented Apr 24, 2025

Now that ModelSettings has Reasoning, a non-primitive object, dataclasses.as_dict() wont work. It will raise an error when you try to serialize (e.g. for tracing). This ensures the object is actually serializable.

@rm-openai rm-openai mentioned this pull request Apr 24, 2025
@rm-openai rm-openai changed the base branch from rm/pr581 to main April 24, 2025 00:26
Copy link
Contributor

@pakrym-oai pakrym-oai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the mix of data classes and pydantic makes me sad

@rm-openai
Copy link
Collaborator Author

yeah :(

@rm-openai rm-openai merged commit 3755ea8 into main Apr 24, 2025
10 checks passed
@rm-openai rm-openai deleted the rm/pr582 branch April 24, 2025 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants