Skip to content
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

Make finishReason nullable #51 #52

Merged
merged 1 commit into from
Feb 27, 2023
Merged

Conversation

careybaird
Copy link
Contributor

A recent change to the OpenAI API means that finish_reason is sometimes returned as NULL and causes an exception.

This change allows finishReason to be nullable.

A recent change to the OpenAI API means that finish_reason is sometimes returned as NULL and causes an exception.

This change allows finishReason to be nullable.
@JonPurvis
Copy link

Thanks for this @careybaird, was just about to report it as an issue and then saw your PR, I'd say I get this 60-70% of the time, hopefully this will be merged soon 🥳

@careybaird
Copy link
Contributor Author

tagging @nunomaduro as I believe this issue is urgent, it affects everyone

@janverhulst
Copy link

janverhulst commented Feb 27, 2023

Same issue here, really urgent for us as well, since we cannot continue developing our software without this. Thank you for the PR @careybaird

@williamjulianvicary
Copy link

Came here to make the same PR - thanks for pushing the change - agreed this should be a priority merge, affecting a lot of requests.

@nunomaduro nunomaduro merged commit 95f86be into openai-php:main Feb 27, 2023
@sgasser
Copy link

sgasser commented Feb 27, 2023

@nunomaduro can you tag a new release with this fix? Thanks

@careybaird
Copy link
Contributor Author

If you want a workaround to use this now, see this: #50 (comment)

@nunomaduro
Copy link
Contributor

Fixed on v0.3.2.

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.

6 participants