Skip to content

TypeError: 'ChatCompletionMessage' object is not subscriptable #774

Closed as not planned
@roland71

Description

@roland71

Confirm this is an issue with the Python library and not an underlying OpenAI API

  • This is an issue with the Python library

Describe the bug

content_with_padding_02 = "\u200B\n\n" + response_02.choices[0].message['content']

TypeError: 'ChatCompletionMessage' object is not subscriptable

To Reproduce

content_with_padding_02 = "\u200B\n\n" + response_02.choices[0].message['content']

TypeError: 'ChatCompletionMessage' object is not subscriptable

Code snippets

content_with_padding_02 = "\u200B\n\n" + response_02.choices[0].message['content']

TypeError: 'ChatCompletionMessage' object is not subscriptable

OS

macOS

Python version

3.11.4

Library version

1.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions