Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
warching committed Aug 4, 2023
1 parent 3960c0b commit 86bb6e7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ OPENAI_API_KEY=
# (set True to enable logging)
VERBOSE=False
# (optional, required for production)
OPENAI_API_TYPE=azure
OPENAI_API_VERSION=2023-07-01-preview
OPENAI_API_BASE=
DEPLOYMENT_NAME=
# OPENAI_API_TYPE=azure
# OPENAI_API_VERSION=2023-07-01-preview
# OPENAI_API_BASE=
# DEPLOYMENT_NAME=
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,23 @@ For deployments, you can use `pip install codeinterpreterapi` instead which does

## Usage

Make sure to set the `OPENAI_API_KEY` environment variable (or use a `.env` file)
To configure OpenAI and Azure OpenAI, ensure that you set the appropriate environment variables (or use a .env file):

For OpenAI, set the OPENAI_API_KEY environment variable:
```
export OPENAI_API_KEY=your_openai_api_key
```

For Azure OpenAI, set the following environment variables:
```
export OPENAI_API_TYPE=azure
export OPENAI_API_VERSION=your_api_version
export OPENAI_API_BASE=your_api_base
export OPENAI_API_KEY=your_azure_openai_api_key
export DEPLOYMENT_NAME=your_deployment_name
```

Remember to replace the placeholders with your actual API keys and other required information.

```python
from codeinterpreterapi import CodeInterpreterSession
Expand Down

0 comments on commit 86bb6e7

Please sign in to comment.