⚡️ OpenAI PHP is a supercharged community-maintained PHP API client that allows you to interact with OpenAI API.
4.98k
stars
519
forks
source link
[Bug]: Logprobs property is missing in Chat\CreateResponseChoice #455
Open
GubaEvgeniy opened 4 months ago
Description
As you can see in the legacy Completion method, support for logprobs is included: https://github.com/openai-php/client/blob/e9ca2886aa9c0bf60fb3b8df00ad9e5b876a0916/src/Responses/Completions/CreateResponseChoice.php#L12
However, in the current Chat method, support for logprobs is completely missing: https://github.com/openai-php/client/blob/e9ca2886aa9c0bf60fb3b8df00ad9e5b876a0916/src/Responses/Chat/CreateResponseChoice.php#L7
Please rectify this situation and add support for logprobs to Chat. Thank you.
Steps To Reproduce
Define a chat request as documented, specifying support for logprobs:
Receive a response from the API that includes a logprobs array in choices.
This attribute is missing from the CreateResponseChoice object - https://github.com/openai-php/client/blob/e9ca2886aa9c0bf60fb3b8df00ad9e5b876a0916/src/Responses/Chat/CreateResponseChoice.php#L7
OpenAI PHP Client Version
0.10.1
PHP Version
8.2
Notes
No response