Skip to content

Commit

Permalink
docs: add configuration documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
gehrisandro committed Aug 28, 2023
1 parent ad50774 commit 70ecab1
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,30 @@ $result = OpenAI::completions()->create([
echo $result['choices'][0]['text']; // an open-source, widely-used, server-side scripting language.
```

## Configuration

Configuration is done via environment variables or directly in the configuration file (`config/openai.php`).

### OpenAI API Key and Organization

Specify your OpenAI API Key and organization. This will be
used to authenticate with the OpenAI API - you can find your API key
and organization on your OpenAI dashboard, at https://openai.com.

```env
OPENAI_API_KEY=
OPENAI_ORGANIZATION=
```

### Request Timeout

The timeout may be used to specify the maximum number of seconds to wait
for a response. By default, the client will time out after 30 seconds.

```env
OPENAI_REQUEST_TIMEOUT=
```

## Usage

For usage examples, take a look at the [openai-php/client](https://github.com/openai-php/client) repository.
Expand Down

0 comments on commit 70ecab1

Please sign in to comment.