Support logprobs for ChatCompletions #533
Labels
enhancement
New feature or request
Ready for next version
This issue solved and waiting for next release
Milestone
Here is description of the feature from OpenAI - https://cookbook.openai.com/examples/using_logprobs
Basically it requires adding two additional parameters into ChatCompletionCreateRequest
This part can be done with existing library, by deriving from ChatCompletionCreateRequest and adding these parameters as
But I could not find and easy way to extend parser of the response. it's hardcoded to parse server response into ChatCompletionCreateResponse, which in turn decode ChatChoiceResponse, which doesn't have a property to capture response from server
So, suggestion is to add two optional parameters mntioned above to ChatCompletionCreateRequest
And add LogProbs property to ChatChoiceResponse (same way as it is declared in ChoiceResponse)
The text was updated successfully, but these errors were encountered: