Class: ChatGPT::Configuration
- Inherits:
-
Object
- Object
- ChatGPT::Configuration
- Defined in:
- lib/chatgpt/configuration.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#api_version ⇒ Object
Returns the value of attribute api_version.
-
#default_engine ⇒ Object
Returns the value of attribute default_engine.
-
#default_parameters ⇒ Object
Returns the value of attribute default_parameters.
-
#max_retries ⇒ Object
Returns the value of attribute max_retries.
-
#request_timeout ⇒ Object
Returns the value of attribute request_timeout.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/chatgpt/configuration.rb', line 9 def initialize @api_version = 'v1' @default_engine = 'text-davinci-002' @request_timeout = 30 @max_retries = 3 @default_parameters = { max_tokens: 16, temperature: 0.5, top_p: 1.0, n: 1 } end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
6 7 8 |
# File 'lib/chatgpt/configuration.rb', line 6 def api_key @api_key end |
#api_version ⇒ Object
Returns the value of attribute api_version.
6 7 8 |
# File 'lib/chatgpt/configuration.rb', line 6 def api_version @api_version end |
#default_engine ⇒ Object
Returns the value of attribute default_engine.
6 7 8 |
# File 'lib/chatgpt/configuration.rb', line 6 def default_engine @default_engine end |
#default_parameters ⇒ Object
Returns the value of attribute default_parameters.
6 7 8 |
# File 'lib/chatgpt/configuration.rb', line 6 def default_parameters @default_parameters end |
#max_retries ⇒ Object
Returns the value of attribute max_retries.
6 7 8 |
# File 'lib/chatgpt/configuration.rb', line 6 def max_retries @max_retries end |
#request_timeout ⇒ Object
Returns the value of attribute request_timeout.
6 7 8 |
# File 'lib/chatgpt/configuration.rb', line 6 def request_timeout @request_timeout end |