Skip to content

[Bug]: Missing default value to logprobs in openai.types.chat.chat_completion.Choice #1043

@davorrunje

Description

@davorrunje

Describe the bug

openai/openai-python#980 added token logprobs to chat completions of type Optional[ChoiceLogprobs] in openai.types.chat.chat_completion.Choice and openai.types.chat.chat_completion_chunk.Choice. In the latter, the default value is set to None, while in the former it is not set. This causes backward compatibility problems with code written for versions before 1.5.0.

I created a openai/openai-python#1007 in the openai repository as well, but it has to be merged here as well to ensure operability with openai versions 1.5.x and 1.6.x.

Steps to reproduce

Tests are failing locally and in CI (e.g. https://github.com/microsoft/autogen/actions/runs/7293999612/job/19878098426)

Expected Behavior

I made a pull request to the openai library for the parameter to have the default value set to None. Until then, the parameter logprobs should be set here.

Screenshots and logs

No response

Additional Information

autogen version: 0.2.2
openai version: 1.5.0 and 1.6.0

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions