feat(openai): add logprobs support for chat completions (request encoding, response decoding, tests)#645
Conversation
|
Thanks for adding the logprobs support and the solid test coverage around request encoding, non-stream decoding, and streaming accumulation. I marked this |
|
@mikehostetler Fixed, changed openai_top_logprobs type from Once this merges, I'll open a PR on |
Description
Adds openai_logprobs and openai_top_logprobs provider options to the OpenAI schema. When enabled, logprobs are encoded in the request body and extracted from
choices[0].logprobs.contentin the shareddecode_response_body_openai_format, making them available asresponse.provider_meta[:logprobs]for all OpenAI Chat Completions responses.Type of Change
Breaking Changes
NA
Testing
mix test)mix quality)Checklist
CHANGELOG.md(it is auto-generated by git_ops)Related Issues