Skip to content

Python: AttributeError: 'Choice' object has no attribute 'logprobs' (OpenAITextCompletionBase) #5070

@ymuichiro

Description

@ymuichiro

Describe the bug

This is the same issue as the following: Azure OpenAI API may not include logprobs.

#4923

The recent change only modified OpenAIChatCompletionBase. However, it turns out that this issue also occurs with OpenAITextCompletionBase. Therefore, I propose to make a similar fix.

To Reproduce

The following users have tried it:
#4924 (comment)

Expected behavior

Logprobs can be None.

Platform

  • OS: M2 Mac
  • IDE: VS Code
  • Language: Python
  • Source: pip package version 23.3.2, main branch of repository

Additional context

More detailed information is provided below.

※ I'm the same person as @yuichiromukaiyama

Metadata

Metadata

Assignees

No one assigned

    Labels

    pythonPull requests for the Python Semantic Kerneltriage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions