Docs
Integrations
sublime-text-3
Generate Code

1. Ensure AskCodi is Installed

First, make sure you have AskCodi installed in your Editor.

Sublime Text 3

2. Type Your Query

Start by typing your query in the open file in the editor. You can enter it as a comment or a statement. For example, type 'Normalize pixel values to be between 0 and 1.'


3. Use Generate Code

Now, select your query, right-click, and from the menu, choose AskCodi, then click on 'Generate Code.'

Sublime Text 3

4. Language Detection and Model Switching

The language is auto picked based on the file, and the model can be switched from Settings.(Follow next 2 steps)

Sublime Text 3

5. AskCodi Settings in Sublime

Open the Settings by clicking on 'Sublime Text'(top left), goto to package settings => AskCodi => settings

Sublime Text 3

6. Model Switching

Change the model in the json

Sublime Text 3

7. AskCodi Processes the Query

AskCodi considers the previous lines of code as context to understand what you're working on and then processes your query.


8. Receive Code Snippet

In the chat panel, AskCodi provides a snippet of code as an answer. For example, here’s the Python code to normalize the data.

Sublime Text 3

9. Implement the Code

Now, simply copy the generated code from the chat panel and paste it into your editor. It’s that easy!

Sublime Text 3

And there you have it—a quick guide to using the 'Generate Code' feature in the AskCodi extension for Visual Studio Code. This tool is perfect for speeding up your coding process and getting help on the fly.