-
-
Notifications
You must be signed in to change notification settings - Fork 505
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
TypeError when constructing OpenAI response choice object with null finish reason. #50
Comments
Getting the same error. Any solution? |
Started seeing this also. Seems to be a recent breaking change in the OpenAI API. The documentation doesn't say much about valid values for finish_reason, so I suggest we should treat it as potentially null. I can do a PR maybe later today, will check in here in a few hours. |
Pull request made: #52 |
If anyone else wants to apply this fix without waiting for the new release (and you're using composer), change the package in your composer file like this and run
Note that we are aliasing it as 0.3.1 so it will still work with other packages that use it as a dependency (e.g. openai-php/laravel) (remember to change it back when a proper version is released!) |
Fixed on |
The text was updated successfully, but these errors were encountered: