forked from openvinotoolkit/openvino_contrib
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VSCode Extension Bugfix (openvinotoolkit#728)
Add timeout handling on backend Fix Pasring of Complex Types for Docstring Generation Fix completion acceptance that starts with tab Update README.md Update settings description
- Loading branch information
Showing
18 changed files
with
218 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,50 @@ | ||
# OpenVINO Code - VSCode extension for AI code completion with OpenVINO™ | ||
|
||
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 | ||
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](https://marketplace.visualstudio.com/items?itemName=ms-vscode.remote-explorer). | ||
|
||
OpenVINO Code provides the following features: | ||
- Inline Code Completion | ||
- Summarization via docstring | ||
|
||
- Inline Code Completion | ||
- Summarization via Docstring | ||
|
||
## Working with Extension | ||
|
||
1. Create a new python file | ||
2. Try typing `def main():` | ||
3. Press shortcut button `ctrl+alt+space` for code completion | ||
### Starting Server | ||
|
||
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. | ||
|
||
### Code Completion | ||
|
||
1. Create a new Python file or open an existing one. | ||
1. Type `def main():` or place the cursor where you'd like code suggestions to be generated. | ||
1. Press the keyboard shortcut `Ctrl+Alt+Space` or click the `Generate Code Completion` button located in the side panel. | ||
1. Use the `Tab` key to accept the entire suggestion or `Ctrl`+`Right Arrow` to accept it word by word. To decline the suggestion, press `Esc`. | ||
|
||
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. | ||
|
||
### Summarization via Docstring Generation | ||
|
||
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. | ||
|
||
### Checking output | ||
### Monitoring Extension Output | ||
|
||
You can see input to and output from the code generation API: | ||
To examine the input and output from the code generation API, follow these steps: | ||
|
||
1. Open VSCode Side Panel | ||
2. Click `Show Server Log` or `Show Extension Log` | ||
1. Open OpenVINO Code Side Panel | ||
1. Choose between two options: `Show Server Log` or `Show Extension Log`. |
Binary file not shown.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.