The plugin generates solution for programming tasks using ChatGPT right in the IntelliJ IDEA.
- 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
- 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)
- Then you got the answer from Chat GPT right in the Editor
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++:
- Kotlin:
А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.
А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: