-
-
Notifications
You must be signed in to change notification settings - Fork 592
[Bug]: $acceptedPredictionTokens must be of type int, null given #524
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
Comments
I have same issue. |
I think openai modify HTTP Response struct. |
the same issue |
Anyone have a raw payload from the service? A few fixes all trying to fix this a different way and I just want to see a raw sample to identify the source issue myself. |
Description
Hi, I'm using v0.10.3 with Azure and with GPT-4o, all was working fine.
After switching to o1-mini, I'm getting this error:
PHP Fatal error: Uncaught TypeError: OpenAI\\Responses\\Chat\\CreateResponseUsageCompletionTokensDetails::__construct(): Argument #3 ($acceptedPredictionTokens) must be of type int, null given, called in /var/www/ai.local/vendor/openai-php/client/src/Responses/Chat/CreateResponseUsageCompletionTokensDetails.php on line 21 and defined in /var/www/ai.local/vendor/openai-php/client/src/Responses/Chat/CreateResponseUsageCompletionTokensDetails.php:9\nStack trace:\n#0 /var/www/ai.local/vendor/openai-php/client/src/Responses/Chat/CreateResponseUsageCompletionTokensDetails.php(21): OpenAI\\Responses\\Chat\\CreateResponseUsageCompletionTokensDetails->__construct()\n#1 /var/www/ai.local/vendor/openai-php/client/src/Responses/Chat/CreateResponseUsage.php(27): OpenAI\\Responses\\Chat\\CreateResponseUsageCompletionTokensDetails::from()\n#2 /var/www/ai.local/vendor/openai-php/client/src/Responses/Chat/CreateResponse.php(59): OpenAI\\Responses\\Chat\\CreateResponseUsage::from()\n#3 /var/www/ai.local/vendor/openai-php/client/src/Resources/Chat.php(35): OpenAI\\Responses\\Chat\\CreateResponse::from()\n#4 /var/www/ai.local/index.php(53): OpenAI\\Resources\\Chat->create()\n#5 {main}\n thrown in /var/www/ai.local/vendor/openai-php/client/src/Responses/Chat/CreateResponseUsageCompletionTokensDetails.php on line 9, referer: https://ai.local/
Somebody knows what this could be caused by, or how I could work around this? Thank you :)
Steps To Reproduce
Try to use o1-mini on Azure, with any message.
OpenAI PHP Client Version
v0.10.3
PHP Version
8.2.26
Notes
No response
The text was updated successfully, but these errors were encountered: