This extension helps you to use OpenAI products in Visual Studio Code
- You can access commands via pressing CMD + Shift + P (CTRL + Shift + P for Windows)
- If you set OpenAI Api Key then you'll be using Codex
- If you set ChatGPT Credentials then you'll be using ChatGPT
- To change between, just empty the credentials of other one by setting them empty.
You can get your api key from here: https://beta.openai.com/account/api-keys
You can get your credentials from Developer Tools -> Application Tab -> Cookies
and then get session token and clearance token from there.
Reason why: see warning above for more info.
- Search for
OpenAI Helper: Generate
command, press enter - After that you'll see wait text for all of your comment lines starts with
@ai ...
- You'll get the response generated after a while (depending on the response time of ChatGPT/Codex APIs)
- Select the function or code piece you want to refactor, search for
OpenAI Helper: Refactor Selection
command, press enter - After that you'll see wait text for your selection
- You'll get the response generated after a while (depending on the response time of ChatGPT/Codex APIs)
- Search for
OpenAI Helper: Image Generation
command, press enter - After that you'll need to answer several questions about the image
- The generated image will be saved to your working directory
@todo
@todo
- Add refactor selection command
- OpenAI Codex option
- Add image generation command
- Allow to set temperature for Codex
- Stream the response for ChatGPT instead of waiting for it to be finished
- Generate wait texts as placeholders instead of inserting comment lines to file
- Analyze selected code and explain (why it's broken etc.)
- Add create test for function command
- Run multiple
@ai
comments in parallel - Ability to create conversation and change the generated responses
- After ChatGPT has an official API or unofficial one's problems are fixed separate Codex and ChatGPT completely with different commands
- Write test