Visual Studio Code extension to support the new codex API by OpenAI.
An API key (access token) is required in order to use this extension. This token is issued by OpenAI and must be in an environment variable named OPENAI_API_KEY
. You can alternatively specify the API key in the extension settings although this might be less secure, and is generally discouraged.
echo 'export OPENAI_API_KEY=********' >> ~/.bashrc
npm install -g vsce
npm install
vsce package
code --install-extension *.vsix
vscodex_demo.mov
Shortcut: ctrl+enter
Shortcut: ctrl+shift+enter
To avoid predicting more code than needed, stop-sequences can be specified like class
. A level can be set and modified in the extension.
- Function-level: will only complete your function
- Class-level: will only complete your class
- File-level: No restrictions
- Custom-level: User specified stop sequence.