Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openai.Completion.retrieve() #231

Closed
hend41234 opened this issue Feb 28, 2023 · 3 comments
Closed

openai.Completion.retrieve() #231

hend41234 opened this issue Feb 28, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@hend41234
Copy link

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

@hend41234 hend41234 added the bug Something isn't working label Feb 28, 2023
@FizzyAgent
Copy link
Contributor

openai currently does not support retrieving past completions, you should save and manage completion responses client-side.

@FizzyAgent FizzyAgent mentioned this issue Mar 1, 2023
@hallacy
Copy link
Collaborator

hallacy commented Mar 7, 2023

^ is correct. There is no way to retrieve past completions with the API

@hallacy hallacy closed this as completed Mar 7, 2023
@gnehcgnaw
Copy link

Will there be support in subsequent versions?
I feel openai.Completion.retrieve() is still necessary .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants