1. Ensure AskCodi is Installed
First, make sure you have AskCodi installed in your Editor.
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.'
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)
5. AskCodi Settings in Sublime
Open the Settings by clicking on 'Sublime Text'(top left), goto to package settings => AskCodi => settings
6. Model Switching
Change the model in the json
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.
9. Implement the Code
Now, simply copy the generated code from the chat panel and paste it into your editor. It’s that easy!
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.