Skip to content

Commit

Permalink
docs: reformat api key table for vim doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Robitx authored Dec 10, 2023
1 parent 656a21f commit 3010063
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ Make sure you have OpenAI API key. [Get one here](https://platform.openai.com/ac

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 3010063

Please sign in to comment.