-
Notifications
You must be signed in to change notification settings - Fork 28
FAQ
Answer: If the latest NppOpenAI release is newer than the available version in Notepad++ » Plugins » Plugins Admin
, you may try installing the latest version manually.
- Open Notepad++ and click
?
menu » About Notepad++ (F1) - Check out if you’re using the 32-bit or 64-bit version of N++ (see the image below)
- Download the appropriate NppOpenAI ZIP file from the latest release, e.g.:
- In case of 32-bit Notepad++: https://github.com/Krazal/nppopenai/releases/download/v0.4.2.2/NppOpenAI_x86.zip
- In case of 64-bit Notepad++: https://github.com/Krazal/nppopenai/releases/download/v0.4.2.2/NppOpenAI_x64.zip
- Close Notepad++
- Unzip the files to the plugin folder, e.g.
C:\Program Files (x86)\Notepad++\plugins\NppOpenAI\
with overwriting the existing ones - Try to reopen Notepad++
If you get an error message and/or Notepad++ crashes, please try to remove the NppOpenAI.ini
config file and/or create an empty NppOpenAI_instructions
file (without extension) with UTF-16 LE BOM encoding (last option in the Encoding menu).
A: Use instructions! Click Plugins » NppOpenAI » Edit Instructions
and enter the required text e.g. “Please optimize the PHP code I send. Return the optimized code only.”
There are some useful scenarios:
Q: How to fix OpenAI’s error response: “The model gpt-4
does not exist or you do not have access to it”?
A: This may probably caused by some misconfiguration.
- Open
Plugins » NppOpenAI » Edit Config
menu - Update
model
setting. Currently recommended:model=gpt-4o-mini
- Save the
NppOpenAI.ini
file - Load your settings:
Plugins » NppOpenAI » Load Config
Q: What’s this warning: “The selected text is too long. Please select a text shorter than 2048 characters”?
A: Unfortunately this is a Notepad++ limitation (bug?) as described in #22 issue. However a workaround may work, if you enable chat (Plugins » NppOpenAI » Chat: off
) and try to send your request in more steps (messages) completed with the appropriate instructions.
A: Unfortunately OpenAI has a one-time “free tier” (trial?) mode which is available only for a few months after registration: https://community.openai.com/t/understanding-api-limits-and-free-tier/498517
However you may use Ollama or PrivateGPT on localhost, but their availability has not been tested directly with NppOpenAI. To configure NppOpenAI for local use please see the next question.
A: Officially these systems are not supported, but e.g. you can use a PHP proxy to handle requests and responses. For more information and example code see the #23 issue. For PrivateGPT use the 8001
port, like: $ollama_url = 'http://localhost:8001/v1/chat/completions';
— for more information see the Python SDK for PrivateGPT API.
A: Currently not, but a task has been added to the Project of the plugin.
Q: Does NppOpenAI support context (like previous paragraphs), multiple responses (choices) etc.?
A: No, it doesn’t, but a GUI (config) for better UX is planned, and I’ve some ideas in my mind. ;)