Skip to content

Commit

Permalink
Update README with note on repository fork
Browse files Browse the repository at this point in the history
Add a prominent note about this repo being a fork with improvements.
  • Loading branch information
argshook committed May 23, 2024
1 parent 3bf41db commit 7322469
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@

<!-- panvimdoc-ignore-end -->

---

> **Note:** This repository is a fork of the original [gp.nvim](https://github.com/Robitx/gp.nvim) plugin. It includes a few small improvements which you can find in the [GitHub compare page](https://github.com/Robitx/gp.nvim/compare/main...argshook:gp.nvim:main).
> If you like this plugin, please share your love on the original repository: [gp.nvim](https://github.com/Robitx/gp.nvim)
---

<br>

**ChatGPT like sessions, Instructable text/code operations, Speech to text and Image generation in your favorite editor.**
Expand Down Expand Up @@ -105,19 +113,20 @@ require("gp").setup()

-- shortcuts might be setup here (see Usage > Shortcuts in Readme)
```

## 2. OpenAI API key

Make sure you have OpenAI API key. [Get one here](https://platform.openai.com/account/api-keys) and use it in the [4. Configuration](#4-configuration). Also consider setting up [usage limits](https://platform.openai.com/account/billing/limits) so you won't get suprised at the end of the month.

The OpenAI API key can be passed to the plugin in multiple ways:

| Method | Example | Security Level |
| ------------------------- | -------------------------------------------------------------- | ------------------- |
| hardcoded string | `openai_api_key: "sk-...",` | Low |
| default env var | set `OPENAI_API_KEY` environment variable in shell config | Medium |
| custom env var | `openai_api_key = os.getenv("CUSTOM_ENV_NAME"),` | Medium |
| read from file | `openai_api_key = { "cat", "path_to_api_key" },` | Medium-High |
| password manager | `openai_api_key = { "bw", "get", "password", "OAI_API_KEY" },` | High |
| Method | Example | Security Level |
| ---------------- | -------------------------------------------------------------- | -------------- |
| hardcoded string | `openai_api_key: "sk-...",` | Low |
| default env var | set `OPENAI_API_KEY` environment variable in shell config | Medium |
| custom env var | `openai_api_key = os.getenv("CUSTOM_ENV_NAME"),` | Medium |
| read from file | `openai_api_key = { "cat", "path_to_api_key" },` | Medium-High |
| password manager | `openai_api_key = { "bw", "get", "password", "OAI_API_KEY" },` | High |

If `openai_api_key` is a table, Gp runs it asynchronously to avoid blocking Neovim (password managers can take a second or two).

Expand Down

0 comments on commit 7322469

Please sign in to comment.