Class: OpenAI::Configuration
- Inherits:
-
Object
- Object
- OpenAI::Configuration
- Defined in:
- lib/openai.rb
Constant Summary collapse
- DEFAULT_API_VERSION =
"v1".freeze
- DEFAULT_URI_BASE =
"https://api.openai.com/".freeze
- DEFAULT_REQUEST_TIMEOUT =
120
- DEFAULT_LOG_ERRORS =
false
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#api_type ⇒ Object
Returns the value of attribute api_type.
-
#api_version ⇒ Object
Returns the value of attribute api_version.
-
#extra_headers ⇒ Object
Returns the value of attribute extra_headers.
-
#log_errors ⇒ Object
Returns the value of attribute log_errors.
-
#organization_id ⇒ Object
Returns the value of attribute organization_id.
-
#request_timeout ⇒ Object
Returns the value of attribute request_timeout.
-
#uri_base ⇒ Object
Returns the value of attribute uri_base.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
57 58 59 60 61 62 63 64 65 66 |
# File 'lib/openai.rb', line 57 def initialize @access_token = nil @api_type = nil @api_version = DEFAULT_API_VERSION @log_errors = DEFAULT_LOG_ERRORS @organization_id = nil @uri_base = DEFAULT_URI_BASE @request_timeout = DEFAULT_REQUEST_TIMEOUT @extra_headers = {} end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
43 44 45 |
# File 'lib/openai.rb', line 43 def access_token @access_token end |
#api_type ⇒ Object
Returns the value of attribute api_type.
43 44 45 |
# File 'lib/openai.rb', line 43 def api_type @api_type end |
#api_version ⇒ Object
Returns the value of attribute api_version.
43 44 45 |
# File 'lib/openai.rb', line 43 def api_version @api_version end |
#extra_headers ⇒ Object
Returns the value of attribute extra_headers.
43 44 45 |
# File 'lib/openai.rb', line 43 def extra_headers @extra_headers end |
#log_errors ⇒ Object
Returns the value of attribute log_errors.
43 44 45 |
# File 'lib/openai.rb', line 43 def log_errors @log_errors end |
#organization_id ⇒ Object
Returns the value of attribute organization_id.
43 44 45 |
# File 'lib/openai.rb', line 43 def organization_id @organization_id end |
#request_timeout ⇒ Object
Returns the value of attribute request_timeout.
43 44 45 |
# File 'lib/openai.rb', line 43 def request_timeout @request_timeout end |
#uri_base ⇒ Object
Returns the value of attribute uri_base.
43 44 45 |
# File 'lib/openai.rb', line 43 def uri_base @uri_base end |