Skip to content

Commit e7a908d

Browse files
committed
docs: improve OpenAI API key management and documentation
- Add instructions for setting an environment variable for OpenAI API key - Provide an example of setting the environment variable - Suggest storing the API key in a custom config file
1 parent ae81a78 commit e7a908d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@ Please first create your OpenAI API Key. The [OpenAI Platform](https://platform.
5656

5757
![register](./images/register.png)
5858

59+
An environment variable is a variable that is set on your operating system, rather than within your application. It consists of a name and value.We recommend that you set the name of the variable to OPENAI_API_KEY.
60+
61+
```sh
62+
export OPENAI_API_KEY=sk-xxxxxxx
63+
```
64+
65+
or store your API key in custom config file.
66+
5967
```sh
6068
codegpt config set openai.api_key sk-xxxxxxx
6169
```

0 commit comments

Comments
 (0)