openai-java icon indicating copy to clipboard operation
openai-java copied to clipboard

Support logprobs in chat completion

Open minzhang-haus opened this issue 1 year ago • 3 comments

Hi I've seen that there's logprobs support for the old completion endpoint but not for chat. Is there a plan to add that to the chat completion?

https://platform.openai.com/docs/api-reference/chat/create#chat-create-logprobs

minzhang-haus avatar Mar 29 '24 22:03 minzhang-haus

I republished this library (it seems like the maintainer is gone) over at https://github.com/panghy/openai-java, and just so happens that I added logprobs recently:

https://github.com/panghy/openai-java/blob/aba1ca3b8030a6d6de5187cc1fe303de52f1cbd9/example/src/main/java/example/OpenAiApiExample.java#L62

panghy avatar Apr 03 '24 02:04 panghy

@panghy great! thank you!

minzhang-haus avatar Apr 03 '24 16:04 minzhang-haus

Maybe you want to take a look at the simple-openai Java library which has support for logprobs in Chat Completions.

sashirestela avatar Apr 24 '24 15:04 sashirestela