Class: SuperAGI::Configuration
- Inherits:
-
Object
- Object
- SuperAGI::Configuration
- Defined in:
- lib/superagi.rb
Constant Summary collapse
- DEFAULT_API_VERSION =
"v1".freeze
- DEFAULT_URI_BASE =
"https://app.superagi.com/api/".freeze
- DEFAULT_REQUEST_TIMEOUT =
120
Instance Attribute Summary collapse
-
#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.
-
#request_timeout ⇒ Object
Returns the value of attribute request_timeout.
- #secret_key ⇒ Object
-
#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.
22 23 24 25 26 27 28 29 |
# File 'lib/superagi.rb', line 22 def initialize @secret_key = nil @api_type = nil @api_version = DEFAULT_API_VERSION @uri_base = DEFAULT_URI_BASE @request_timeout = DEFAULT_REQUEST_TIMEOUT @extra_headers = nil end |
Instance Attribute Details
#api_type ⇒ Object
Returns the value of attribute api_type.
15 16 17 |
# File 'lib/superagi.rb', line 15 def api_type @api_type end |
#api_version ⇒ Object
Returns the value of attribute api_version.
15 16 17 |
# File 'lib/superagi.rb', line 15 def api_version @api_version end |
#extra_headers ⇒ Object
Returns the value of attribute extra_headers.
15 16 17 |
# File 'lib/superagi.rb', line 15 def extra_headers @extra_headers end |
#request_timeout ⇒ Object
Returns the value of attribute request_timeout.
15 16 17 |
# File 'lib/superagi.rb', line 15 def request_timeout @request_timeout end |
#secret_key ⇒ Object
31 32 33 34 35 36 |
# File 'lib/superagi.rb', line 31 def secret_key return @secret_key if @secret_key error_text = "SuperAGI secret key missing! See https://github.com/alexrudall/superagi#usage" raise ConfigurationError, error_text end |
#uri_base ⇒ Object
Returns the value of attribute uri_base.
15 16 17 |
# File 'lib/superagi.rb', line 15 def uri_base @uri_base end |