Skip to content

openai.Completion.retrieve() #231

Closed
Closed
@hend41234

Description

@hend41234

Describe the bug

EngineAPIResource.init() takes from 1 to 2 positional arguments but 3 were given

To Reproduce

does this only happen to me when using 'retrieve' in openai.
i got this error : "EngineAPIResource.init() takes from 1 to 2 positional arguments but 3 are given"

Code snippets

key = "my_api_key"
openai.api_key=key
id_chat = "my_completion_id"
try:
    result = openai.Completion.retrieve(id_chat)
    print(result['choices'][0]['text'])
except Exception as a:
    print(a)

OS

arch linux

Python version

Python 3.10.9

Library version

openai-python v0.26.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions