Skip to content

Conversation

dmweis
Copy link
Contributor

@dmweis dmweis commented Mar 5, 2023

This Pr should fix Error: invalid_request_error: None is not of type 'string' - 'user' error from the API.

On latest version of the library my requests are failing with the mentioned error. I assume this is because serde json will be default populate the field with "null" and the API expects it to be missing if it's not set?

skip_serializing_if is already implemented on a lot of other fields and I suspect that it might also need to be added to others

@64bit
Copy link
Owner

64bit commented Mar 5, 2023

Hi @dmweis , thank you for fixing the bug!

I should have tested it before publishing... I'll get this shipped right away

@64bit 64bit merged commit e9d27b2 into 64bit:main Mar 5, 2023
@64bit
Copy link
Owner

64bit commented Mar 5, 2023

Its released in v0.9.2

@dmweis
Copy link
Contributor Author

dmweis commented Mar 5, 2023

Hi @dmweis , thank you for fixing the bug!

I should have tested it before publishing... I'll get this shipped right away

Thanks!

@dmweis dmweis deleted the dmw/patch branch March 11, 2023 19:28
harsh-98 pushed a commit to harsh-98/async-openai that referenced this pull request Sep 3, 2025
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