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

[Bug]: Logprobs property is missing in Chat\CreateResponseChoice #455

Open
GubaEvgeniy opened this issue Jul 22, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@GubaEvgeniy
Copy link

Description

As you can see in the legacy Completion method, support for logprobs is included:

public readonly ?CreateResponseChoiceLogprobs $logprobs,

However, in the current Chat method, support for logprobs is completely missing:

final class CreateResponseChoice

Please rectify this situation and add support for logprobs to Chat.
Thank you.

Steps To Reproduce

  1. Define a chat request as documented, specifying support for logprobs:
$response = $client->chat()->create([
    'model' => 'gpt-3.5-turbo',
    'messages' => [
        ['role' => 'user', 'content' => 'Hello!'],
    ],
    'logprobs' => true,
]);
  1. Receive a response from the API that includes a logprobs array in choices.
Снимок экрана 2024-07-22 в 14 52 40
  1. This attribute is missing from the CreateResponseChoice object -
    final class CreateResponseChoice

OpenAI PHP Client Version

0.10.1

PHP Version

8.2

Notes

No response

@GubaEvgeniy GubaEvgeniy added the bug Something isn't working label Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant