jupyterlab-codex
jupyterlab-codex copied to clipboard
Update Default Engine Name to code-davinci-002
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
?
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.
@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?
Well, Sorry... I am on the waiting list for code-davinci-002
, so I cannot say whether that fix is actually effective.
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
@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 — 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.