https://github.com/Krazal/nppopenai
OpenAI (aka. ChatGPT) plugin for Notepad++
https://github.com/Krazal/nppopenai
chatgpt notepad-plus-plus npppluginlist openai
Last synced: 9 months ago
JSON representation
OpenAI (aka. ChatGPT) plugin for Notepad++
- Host: GitHub
- URL: https://github.com/Krazal/nppopenai
- Owner: Krazal
- License: gpl-2.0
- Created: 2023-02-28T14:41:18.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-02-07T13:51:40.000Z (11 months ago)
- Last Synced: 2025-02-07T14:38:18.106Z (11 months ago)
- Topics: chatgpt, notepad-plus-plus, npppluginlist, openai
- Language: C++
- Homepage:
- Size: 18.7 MB
- Stars: 79
- Watchers: 3
- Forks: 21
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NppOpenAI — OpenAI (aka. ChatGPT) plugin for Notepad++
A simple Notepad++ plugin to communicate with OpenAI directly from your favorite code editor.
How it works?
-------------
Simply select your text in Notepad++, press `Ctrl + Shift + O`, and you'll see the AI generated response in seconds. (Additional settings required.) Two examples: "Please create a Fibonacci function in PHP"; "Mi az árvíztűrő tükörfúrógép?" (Hungarian Unicode test). This plugin requires an active internet connection and an OpenAI registration / API key (handles it confidentially).
Can I install (update) it manually?
-----------------------------------
Sure! If the latest release here in GitHub is newer than the NppOpenAI plugin in the Plugin Manager, [follow this guide](https://github.com/Krazal/nppopenai/wiki/FAQ#question-ive-an-old-buggy-nppopenai-release-how-should-i-update) to install it manually.
How to configure?
-----------------
**To remove your original question/request,** please uncheck Plugins » NppOpenAI » Keep my question option.
For additional settings, please open the configuration file (`NppOpenAI.ini`) from Plugins » NppOpenAI » Edit Config, and edit the `[API]` section. For available plugin settings, see [OpenAI API Reference](https://platform.openai.com/docs/api-reference/completions). You can track your token usage via the `total_tokens_used` setting in `[PLUGIN]` section.
**To send a system message** (I call this “instructions”) along with your question, please open the instructions file (`NppOpenAI_instructions`) from Plugins » NppOpenAI » Edit Instructions. How to use? For example:
* Click Plugins » NppOpenAI » Edit Instructions
* Enter any instruction, like: Please translate the received text into English.
* Save the file
* Click Plugins » NppOpenAI » Load Config
* Open an empty file and enter e.g. Kérlek, mondd, hogy ez egy teszt
* Select the text and press `Ctrl + Shift + O`
* You should get the following result: “Please, say that this is a test”, instead of “Ez egy teszt” (“This is a test”).
If you don't want to use “instructions”, please leave the `NppOpenAI_instructions` file empty.
After editing and saving `NppOpenAI.ini` and/or `NppOpenAI_instructions`, please always load your settings: Plugins menu » NppOpenAI » Load Config.
**To enable chat,** please click Plugins » NppOpenAI » Chat: off menu item, and check in the Use chat. You may also increase/decrease chat limit for optimal token usage. To turn off chat, please click Plugins » NppOpenAI » Chat limit: [numeric limit] and turn off Use chat.
The chat can even be used in conjunction with the “instructions”. However, the chat history to be displayed is not (yet) available.
Have a question?
----------------
If you experience an error or are interested in suggestions, please visit the [FAQ page](https://github.com/Krazal/nppopenai/wiki/FAQ)!
Additional information
----------------------
Some help how to build cURL with OpenSSL and zlib:
https://developers.refinitiv.com/en/article-catalog/article/how-to-build-openssl--zlib--and-curl-libraries-on-windows
After manually building this plugin, please copy `*.dll` and `cacert.pem` (source: https://curl.se/ca/cacert.pem) files from `vs.proj/helper_files_[platform]` directory to your Notepad++ plugin folder (`C:\Program Files (x86)\Notepad++\plugins\NppOpenAI` by default).
ARM platforms are not supported.