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

feat(chat-completions): Add Logprobs for ChatCompletions #328

Merged

Conversation

jkohls-indeed
Copy link
Contributor

@jkohls-indeed jkohls-indeed commented Apr 26, 2024

Q A
Bug fix? no
New feature? yes
BC breaks? no
Related Issue Fix #326

Describe your change

Wanted to be able to get the logprobs in the response from openai. It looks like its a non beta feature exposed in the chat completion object

https://platform.openai.com/docs/api-reference/chat/object

I've attempted to capture it as specified, and verified that top_logprobs is provided whether we do or do not limit how many are returned as denoted in the test.

What problem is this fixing?

Closing the gap between what openai has exposed and what is supported.

Should be resolving: #326

@jkohls-indeed jkohls-indeed changed the title Add Logprobs for ChatCompletions feat(chat-completions): Add Logprobs for ChatCompletions Apr 26, 2024
Copy link
Owner

@aallam aallam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! thank you for your contribution!

@aallam aallam merged commit 036bd79 into aallam:main Apr 28, 2024
@jkohls-indeed jkohls-indeed deleted the feat/add-logprobs-for-chatcompletions branch April 29, 2024 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Logprobs are not exposed in chat completions
2 participants