Skip to content

gaojian80422/chatgpt-mysql-vscode-plugin

 
 

Repository files navigation

ChatGPT With MySQL Cache VSCode Extension

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.

Usage

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

Commands:

  • yarn setup (installs project dependencies)
  • yarn compile (generates js files)
  • yarn vscode:package (creates vscode installer package)
  • yarn vscode:install (installs vscode package)

Features

Commands:

  • 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.

Support

If you need help using this extension, please open an issue on the GitHub repository for this extension.

Credits

About

A VS code plugin for ChatGPT with MySQL cache

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 67.6%
  • JavaScript 25.6%
  • CSS 6.8%