We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Since like two days I get the following error.
Undefined array key "logprobs" {"userId":3,"exception":"[object] (ErrorException(code: 0): Undefined array key \"logprobs\" at /var/www/html/vendor/openai-php/client/src/Responses/Completions/CreateResponseChoice.php:24)
OpenAi::completions()->create([ 'model' => 'gpt-3.5-turbo-instruct', 'prompt' => "This is a test", 'max_tokens' => 600, 'temperature' => 0 ]);
0.10.2
8.2
No response
The text was updated successfully, but these errors were encountered:
Quick fix
File vendor\openai-php\client\src\Responses\Completions\CreateResponseChoice.php
vendor\openai-php\client\src\Responses\Completions\CreateResponseChoice.php
line 22 return new self( $attributes['text'], $attributes['index'], $attributes['logprobs'] ?? null ? CreateResponseChoiceLogprobs::from($attributes['logprobs']) : null, $attributes['finish_reason'], );
return new self( $attributes['text'], $attributes['index'], $attributes['logprobs'] ?? null ? CreateResponseChoiceLogprobs::from($attributes['logprobs']) : null, $attributes['finish_reason'], );
Sorry, something went wrong.
I fixed it by sending logprobs => 0 while creating completions.
No branches or pull requests
Description
Since like two days I get the following error.
Undefined array key "logprobs" {"userId":3,"exception":"[object] (ErrorException(code: 0): Undefined array key \"logprobs\" at /var/www/html/vendor/openai-php/client/src/Responses/Completions/CreateResponseChoice.php:24)
Steps To Reproduce
OpenAi::completions()->create([ 'model' => 'gpt-3.5-turbo-instruct', 'prompt' => "This is a test", 'max_tokens' => 600, 'temperature' => 0 ]);
OpenAI PHP Client Version
0.10.2
PHP Version
8.2
Notes
No response
The text was updated successfully, but these errors were encountered: