GAI Choy VSCode Extension
GAI Choy stands for Generative AI empowered, Code Helper On Your side.
Gai Choy, also known as Chinese mustard greens, is a type of leafy vegetable having a distinct, pungent flavor that is often described as spicy, slightly bitter, or peppery. Its strong flavor makes it a popular choice for adding depth and complexity to a variety of dishes. Despite its toughness, it becomes tender and more palatable when cooked, making it a versatile ingredient in the kitchen.
Why another extension for AOAI?
Here's an exhuastive list of extensions I tried:
How to Install the Extension
Option 1 - Install from Extensions Marketplace
Search "GAI Choy" in your Extensions tab in VSCode and install the plugin from there. VS Code Extension - Gai Choy
Option 2 - Offline Installation
Requirements to Build from Source
Compile the Plugin
If you want to run the package from source code, you need to execute the following command:
and it will create a visx package file like:
Azure OpenAI (AOAI) service
The AOAI service setup varies depending on how your cloud infrastructure is designed and implemented. Here's how-to article to get you started. For more production-grade setup you may consult cloud architect, engineer or SRE.
Note that this step is not required for AOAI integration. Please refer to source repo's README.md for details.
Configure the Plugin
Note: Different model runtime environments can be configured within the plugin. For the CodeShell-7B-Chat-int4 model, you can choose the
To use Azure OpenAI service as the LLM model, there're additional parameters that need to be configured:
1. Code Completion
During the coding process, code completion suggestions can automatically trigger when you pause input (configurable with the
When the plugin provides code suggestions, the suggested content appears in gray at the editor's cursor position. You can press the Tab key to accept the suggestion or continue typing to ignore it.
2. Code Assistance
In the VSCode sidebar, open the plugin's Q&A interface. Select a portion of code in the editor, right-click to access the CodeShell menu, and choose the corresponding function. The plugin will provide relevant responses in the Q&A interface.
3. Code Q&A
Within the Q&A interface's code block, you can click the copy button to copy the code block or use the insert button to insert the code block's content at the editor's cursor location.