![]() ![]() ![]() Also check out CodeGPT extension that uses official OpenAI API and also supports other GPT3 models. We welcome feedback and contributions to improve the extension. Please note that this extension is currently a proof of concept and may have some limitations or bugs. To reset the conversation context, click ctrl+shift+p and select ChatGPT: Reset Conversation. If you aren't satisfied with an answer and would like to retry the request, click ctrl+shift+p and select Retry ChatGPT request. The conversation context is maintained between queries, so you can ask multiple questions in a row (this can be disabled in the extension settings.). For the other four commands, you can customize the exact prompt that will be sent to the AI by editing the extension settings in VSCode Preferences.īecause ChatGPT is a conversational AI, you can ask follow-up questions to the response. ChatGPT: Optimize selection: tries to optimize the selected codeĪsk ChatGPT is also available when nothing is selected.ChatGPT: Find problems: looks for problems/errors in the selected code, fixes and explains them.ChatGPT: Refactor selection: will try to refactor the selected code.ChatGPT: Explain selection: will explain what the selected code does.Ask ChatGPT: will provide a prompt for you to enter any query.You can select some code in the editor, right click on it and choose one of the following shortcuts from the context menu: Commands: The code will be automatically inserted at the cursor position in the active editor. To insert a code snippet from the AI's response into the editor, simply click on the code block in the panel. This can be useful for generating code snippets or getting explanations for specific pieces of code. The selected code will be automatically appended to your query when it is sent to the AI. You can also select a code snippet in the editor and then enter a prompt in the side panel, or right-click and select "Ask ChatGPT". Its response will be displayed below the input field in the sidebar (note that it may take some time for it to be calculated). By clicking enter, it will be sent to ChatGPT. This will open a panel with an input field where you can enter your prompt or question. To use the extension, open a text editor in Visual Studio Code and open the ChatGPT panel by clicking on the ChatGPT icon in the sidebar. A custom API URL can also be set in the API URL field (probably looks something like, can be used to connect to a self-hosted instance of the API or a proxy). You can choose between ChatGPT and GPT4 by changing the Model setting (only if you already have access to GPT4 API). The extension can be configured or customized by changing several settings. Copy the key and paste it into the API Key field in the extension settings.Click on the Create new secret key button.If you don't have an account, you will need to create one or sign up using your Google or Microsoft account. To use this extension, you will need an API key from OpenAI. In the ChatGPT section, enter your API key in the top fieldĪfter completing these steps, the extension should be ready to use.In the search bar, type ChatGPT to filter the settings list.To do this, open the Settings panel by going to the File menu and selecting Preferences, then Settings. After the installation is complete, you will need to add your OpenAI API key to the extension settings in VSCode.To use this extension, install it from the VSCode marketplace. □ Insert code snippets from the AI's response into the active editor by clicking on them.□ Ask follow-up questions to the response (conversation context is maintained).□ See the response as it is being generated in real time.□ View ChatGPT's responses in a panel next to the editor.automatically write documentation for your code. ![]() □️ Right click on a code selection and run one of the context menu shortcuts.□ Ask general questions or use code snippets from the editor to query ChatGPT via an input box in the sidebar.Supercharge your coding with AI-powered assistance! Automatically write new code from scratch, ask questions, get explanations, refactor code, find bugs and more □✨ Links: This Visual Studio Code extension allows you to use the ChatGPT API to generate code or natural language responses from OpenAI's ChatGPT or GPT4 to your questions, right within the editor. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |