Skip to content

Commit b447db4

Browse files
committed
Encourage log_errors in dev mode
1 parent 7018370 commit b447db4

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,10 @@ require "openai"
101101
For a quick test you can pass your token directly to a new client:
102102

103103
```ruby
104-
client = OpenAI::Client.new(access_token: "access_token_goes_here")
104+
client = OpenAI::Client.new(
105+
access_token: "access_token_goes_here",
106+
log_errors: true # Highly recommended in development, so you can see what errors OpenAI is returning. Not recommend in production.
107+
)
105108
```
106109

107110
### With Config
@@ -110,8 +113,9 @@ For a more robust setup, you can configure the gem with your API keys, for examp
110113

111114
```ruby
112115
OpenAI.configure do |config|
113-
config.access_token = ENV.fetch("OPENAI_ACCESS_TOKEN")
114-
config.organization_id = ENV.fetch("OPENAI_ORGANIZATION_ID") # Optional.
116+
config.access_token = ENV.fetch("OPENAI_ACCESS_TOKEN")
117+
config.organization_id = ENV.fetch("OPENAI_ORGANIZATION_ID") # Optional.
118+
config.log_errors = true # Highly recommended in development, so you can see what errors OpenAI is returning. Not recommend in production.
115119
end
116120
```
117121

0 commit comments

Comments
 (0)