VSCode extension for helping developers writing code with AI code assistant. OpenVINO Code is working with Large Language Model for Code (Code LLM) deployed on local server or remote server using Remote Explorer.
OpenVINO Code provides the following features:
- Inline Code Completion
- Summarization via Docstring
- Fill in the Middle Mode
On the extension side panel, choose your preferred model from the available options. The features supported by the selected model, which will be displayed under the model selector.
Once the server is up and running, you can access instructions for utilizing various functions available with selected model on the sidebar of the extension.
Now you can check the server's status and connection status.
Additionally, connection status shown on the VSCode Status Bar.
To check the connection manually, use the Check Connection
button located on the side panel.
- Create a new Python file or open an existing one.
- Type
def main():
or place the cursor where you'd like code suggestions to be generated. - Press the keyboard shortcut
Ctrl+Alt+Space
(Cmd+Alt+Space
for macOS) or click theGenerate Code Completion
button located in the side panel. - You can select the text then generate the related code.
- You may also right-click on "Generate Inline Code Completion In New Tab" to generate code in a new tab.
- Use the
Tab
key to accept the entire suggestion orCtrl
+Right Arrow
to accept it word by word. To decline the suggestion, pressEsc
.
You can customize the length of the generated code by adjusting Max New Tokens
and Min New Tokens
parameters in the extension settings.
The number of generated tokens is also influenced by the Server Request Timeout
setting.
To enable streaming generation mode, check the Stream Inline Completion
checkbox in the extension settings.
This mode allows you to immediately receive model output and avoid problems with server response timeouts.
To generate function docstring start typing """
or '''
right under function signature and choose Generate Docstring
.
You can select the desired type of quotes in the extension settings.
The model can generate docstring in Code Completion mode, but in this case it is impossible to control the result. In the docstring generation mode, various popular templates are available in the settings that will guide the model output.
- Create a new Python file or open an existing one.
- Place the cursor where you'd like middle text to be generated or a line of code to be generated.
- Press the keyboard shortcut
Ctrl+Alt+Space
(Cmd+Alt+Space
for macOS) or click theGenerate Code Completion
button located in the side panel. - You can select the text then generate the related code.
- You may also right-click on "Generate Inline Code Completion In New Tab" to generate code in a new tab.
- Use the
Tab
key to accept the entire suggestion orCtrl
+Right Arrow
to accept it word by word. To decline the suggestion, pressEsc
.
You can customize the length of the generated code by adjusting Max New Tokens
and Min New Tokens
parameters in the extension settings.
The number of generated tokens is also influenced by the Server Request Timeout
setting.
Fill in the middle mode brings in advanced code completion capabilities supporting fill-in-the-blank task, supporting project-level code completion and infilling tasks.
To enable fill in the middle mode, check the Fill In The Middle Mode
checkbox in the extension settings.
To examine the input and output from the code generation API, follow these steps:
- Open OpenVINO Code Side Panel
- Choose between two options:
Show Server Log
orShow Extension Log
.