File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,30 @@ $result = OpenAI::completions()->create([
51
51
echo $result['choices'][0]['text']; // an open-source, widely-used, server-side scripting language.
52
52
```
53
53
54
+ ## Configuration
55
+
56
+ Configuration is done via environment variables or directly in the configuration file (` config/openai.php ` ).
57
+
58
+ ### OpenAI API Key and Organization
59
+
60
+ Specify your OpenAI API Key and organization. This will be
61
+ used to authenticate with the OpenAI API - you can find your API key
62
+ and organization on your OpenAI dashboard, at https://openai.com .
63
+
64
+ ``` env
65
+ OPENAI_API_KEY=
66
+ OPENAI_ORGANIZATION=
67
+ ```
68
+
69
+ ### Request Timeout
70
+
71
+ The timeout may be used to specify the maximum number of seconds to wait
72
+ for a response. By default, the client will time out after 30 seconds.
73
+
74
+ ``` env
75
+ OPENAI_REQUEST_TIMEOUT=
76
+ ```
77
+
54
78
## Usage
55
79
56
80
For usage examples, take a look at the [ openai-php/client] ( https://github.com/openai-php/client ) repository.
You can’t perform that action at this time.
0 commit comments