This is a Visual Studio Code extension for ChatGPT with MySQL cache. If hit in mysql database, it will return the result from the database, otherwise return the result from ChatGPT.
To use the extension: This extension uses the official OpenAI library
After you install the ChatGPTMySQL plug in, you should reload the window. ctrl + p, then input reload
Open the settings[Ctrl + ,] and search for "chatgptsql", configure the corresponding options according to the prompts.
You should config the API key get from OpenAI: https://openai.com/account/api-keys,
If you want to cache ChatGPT records(input/output) in MySQL, you need to configure the relevant options for the MySQL database: host, user, and password.
Then you can use it, just select some code then right click, then select the "ChatGPTMySQL" menu, then select the sub command.
Once you're authenticated, you can ask ChatGPT any question and supply source code from your current file/selection.
Install the plugin from this Github repository
yarn setup
(installs project dependencies)yarn compile
(generates js files)yarn vscode:package
(creates vscode installer package)yarn vscode:install
(installs vscode package)
ChatGPTMySQL: Summarize
ChatGPTMySQL: Explain
ChatGPTMySQL: Optimize
ChatGPTMySQL: Find problems
ChatGPTMySQL: Why is it broken?
ChatGPTMySQL: Refactor
ChatGPTMySQL: Add tests
ChatGPTMySQL: Add comments
ChatGPTMySQL: Complete codes
ChatGPTMySQL: Ad-hoc prompt
user custom prompt
Everything are available from the context menu when right-clicking in the editor.
If you need help using this extension, please open an issue on the GitHub repository for this extension.
- barnesoir's chatgpt-vscode-plugin - A VS code plugin for ChatGPT built by ChatGPT
- ChatGPT - The large language model trained by OpenAI that was used to generate this README file
- chatgpt-api - The original NPM used prior to the offical library
- mpociot's extension - Inspiration for the project and the original webview panel
- Gencay's extension - Ported version of Gencay's webview panel.
- Yeoman - The code generator used to scaffold the extension project
- VS Code Extension Generator - The Yeoman generator for creating VS Code extensions