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

Update Default Engine Name to code-davinci-002 #5

Open
matteoferla opened this issue Aug 13, 2022 · 5 comments
Open

Update Default Engine Name to code-davinci-002 #5

matteoferla opened this issue Aug 13, 2022 · 5 comments
Labels
good first issue Good for newcomers

Comments

@matteoferla
Copy link

Problem: It is not clear what the status of this project is and letting folk know what the project development status is helpful in order for them to appraise if to commit to it or not (after all one needs to register for a codex API key and add it to jupyter-lab, wherein version 3.4.4 had a bug that did not permit the editing of the config JSON in the browser etc.).

Solution: Could a classifier entry be added to setup.py file for development status along with a badge in the readme.md?
development status

The last edit was 11 months ago and it is mentioned in a few sites, so I assumed it was Development Status :: 5 - Production/Stable. But after trying to use it I think it's a Development Status :: 2 - Pre-Alpha or Development Status :: 7 - Inactive.
As it currently stands, it does work as it makes an incorrect API call:

import requests

#api_key = '👾👾👾👾'
response = requests.post('https://api.openai.com/v1/engines/davinci-codex/completions', 
                                             headers=dict(Authorization= f'Bearer {api_key}'),
                                             data=dict(...)
                                             )
response.json()

"That model does not exist" is returned because now goes in the POST params.

# https://beta.openai.com/docs/models/content-filter
response = requests.post('https://api.openai.com/v1/completions',
                                             headers=dict(Authorization= f'Bearer {api_key}'),
                                             data=dict(model='code-davinci-002',  ...),
                                             )
response.json()

Also, to use code-davinci-002 for code completion I believe one needs to sign up to the waiting list at https://beta.openai.com/docs/models/codex-series-private-beta.

@Mihonarium
Copy link

@matteoferla thanks for opening the issue! Would you, by any chance, be able to make a fork, fix this particular bug, and publish the package?

@matteoferla
Copy link
Author

Well, Sorry... I am on the waiting list for code-davinci-002, so I cannot say whether that fix is actually effective.

@Maki9009
Copy link

Well, Sorry... I am on the waiting list for code-davinci-002, so I cannot say whether that fix is actually effective.

how would I go about fixing this? i have access currently to code-davinci-002

@lhr0909
Copy link
Owner

lhr0909 commented Dec 4, 2022

@matteoferla Since it is an open source project, I am happy to accept pull requests that updates the default value, amongst other issues too (such as properly setting up the API key on the server side without leaking it from the frontend requests).

Also from what I have seen in the source code, there is configuration option already built and you can actually just change the engine name in the menu, just right next to where you will put the API key when you use the plugin.

@lhr0909 lhr0909 changed the title Project status Update Default Engine Name Dec 4, 2022
@lhr0909 lhr0909 changed the title Update Default Engine Name Update Default Engine Name to code-davinci-002 Dec 4, 2022
@lhr0909 lhr0909 added the good first issue Good for newcomers label Dec 4, 2022
@matteoferla
Copy link
Author

@lhr0909 — I do not access to code-davinci-002 even after registering for the limited beta months ago, so I have no idea if this project works where the key available. But even then, if it's harder to get than a copilot, it makes the scope of the project much more limited, reducing the benefit of investing time into its dev...

My concern was however that it should be made clear in the README.md to a potential user that the widget requires this —I wasted some time being confused about it and I am 100% sure others were too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants