zhiwoeryi / chatGPT-solution-generator-intellij-plugin

The plugin generates solution for programming tasks right in IntelliJ IDEA using ChatGPT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

chatGPT-solution-generator-intellij-plugin

The plugin generates solution for programming tasks using ChatGPT right in the IntelliJ IDEA.

Usage

  1. First you enter your Open AI API token in Preferences | Tools | ChatGPT Solution Generator and click Apply. To get your API token follow this page

Preferences

  1. Then you need to open any file in your IDEA, write there your task statement, highlight it and select Tools | Generate Solution or press ^+\ and ^+G (on MacOs)

Request

  1. Then you got the answer from Chat GPT right in the Editor

Response

Features

Detecting the programming language

The plugin detects which programming language you are currently using (by your file extension) and asks Open AI to respond in this programming language. Thus, you don't need to write in the problem statement what programming language should be used:

  • C++:

C++ request C++ response

  • Kotlin:

Kotlin request Kotlin response

Markdown parser

The plugin gets a response from Chat GPT in Markdown. My own library parses the server response and inserts the response into the editor.

Splitting into lines

Аfter the response is processed by the Markdown-Parser, the plugin divides the response into lines according to the width of the user's screen. So that horizontal scrolling does not occur. The plugin does not separate lines that are part of the code blocks, so that the code stays correct. Also word transposition is taken into account.

Comments adding

Аfter splitting the plugin adds comments to the response lines that are not part of the code blocks. The plugin supports the comments syntax of many programming languages.

  • HTML:

HTML request HTML response

About

The plugin generates solution for programming tasks right in IntelliJ IDEA using ChatGPT


Languages

Language:Kotlin 100.0%