|
11 | 11 |
|
12 | 12 | <!-- panvimdoc-ignore-end -->
|
13 | 13 |
|
| 14 | +--- |
| 15 | + |
| 16 | +> **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). |
| 17 | +
|
| 18 | +> If you like this plugin, please share your love on the original repository: [gp.nvim](https://github.com/Robitx/gp.nvim) |
| 19 | +
|
| 20 | +--- |
| 21 | + |
14 | 22 | <br>
|
15 | 23 |
|
16 | 24 | **ChatGPT like sessions, Instructable text/code operations, Speech to text and Image generation in your favorite editor.**
|
@@ -105,19 +113,20 @@ require("gp").setup()
|
105 | 113 |
|
106 | 114 | -- shortcuts might be setup here (see Usage > Shortcuts in Readme)
|
107 | 115 | ```
|
| 116 | + |
108 | 117 | ## 2. OpenAI API key
|
109 | 118 |
|
110 | 119 | 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.
|
111 | 120 |
|
112 | 121 | The OpenAI API key can be passed to the plugin in multiple ways:
|
113 | 122 |
|
114 |
| -| Method | Example | Security Level | |
115 |
| -| ------------------------- | -------------------------------------------------------------- | ------------------- | |
116 |
| -| hardcoded string | `openai_api_key: "sk-...",` | Low | |
117 |
| -| default env var | set `OPENAI_API_KEY` environment variable in shell config | Medium | |
118 |
| -| custom env var | `openai_api_key = os.getenv("CUSTOM_ENV_NAME"),` | Medium | |
119 |
| -| read from file | `openai_api_key = { "cat", "path_to_api_key" },` | Medium-High | |
120 |
| -| password manager | `openai_api_key = { "bw", "get", "password", "OAI_API_KEY" },` | High | |
| 123 | +| Method | Example | Security Level | |
| 124 | +| ---------------- | -------------------------------------------------------------- | -------------- | |
| 125 | +| hardcoded string | `openai_api_key: "sk-...",` | Low | |
| 126 | +| default env var | set `OPENAI_API_KEY` environment variable in shell config | Medium | |
| 127 | +| custom env var | `openai_api_key = os.getenv("CUSTOM_ENV_NAME"),` | Medium | |
| 128 | +| read from file | `openai_api_key = { "cat", "path_to_api_key" },` | Medium-High | |
| 129 | +| password manager | `openai_api_key = { "bw", "get", "password", "OAI_API_KEY" },` | High | |
121 | 130 |
|
122 | 131 | If `openai_api_key` is a table, Gp runs it asynchronously to avoid blocking Neovim (password managers can take a second or two).
|
123 | 132 |
|
|
0 commit comments