Class: PolylingoChat::Config
- Inherits:
-
Object
- Object
- PolylingoChat::Config
- Defined in:
- lib/polylingo_chat/config.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#async ⇒ Object
Returns the value of attribute async.
-
#cache_store ⇒ Object
Returns the value of attribute cache_store.
-
#default_language ⇒ Object
Returns the value of attribute default_language.
-
#model ⇒ Object
Returns the value of attribute model.
-
#provider ⇒ Object
Returns the value of attribute provider.
-
#queue_adapter ⇒ Object
Returns the value of attribute queue_adapter.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/polylingo_chat/config.rb', line 5 def initialize @provider = :openai @api_key = ENV['POLYGLOT_API_KEY'] @model = 'gpt-4o-mini' @default_language = 'en' @cache_store = nil @async = true @timeout = 15 @queue_adapter = nil # Optional: Specify which ActiveJob adapter you're using end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
3 4 5 |
# File 'lib/polylingo_chat/config.rb', line 3 def api_key @api_key end |
#async ⇒ Object
Returns the value of attribute async.
3 4 5 |
# File 'lib/polylingo_chat/config.rb', line 3 def async @async end |
#cache_store ⇒ Object
Returns the value of attribute cache_store.
3 4 5 |
# File 'lib/polylingo_chat/config.rb', line 3 def cache_store @cache_store end |
#default_language ⇒ Object
Returns the value of attribute default_language.
3 4 5 |
# File 'lib/polylingo_chat/config.rb', line 3 def default_language @default_language end |
#model ⇒ Object
Returns the value of attribute model.
3 4 5 |
# File 'lib/polylingo_chat/config.rb', line 3 def model @model end |
#provider ⇒ Object
Returns the value of attribute provider.
3 4 5 |
# File 'lib/polylingo_chat/config.rb', line 3 def provider @provider end |
#queue_adapter ⇒ Object
Returns the value of attribute queue_adapter.
3 4 5 |
# File 'lib/polylingo_chat/config.rb', line 3 def queue_adapter @queue_adapter end |
#timeout ⇒ Object
Returns the value of attribute timeout.
3 4 5 |
# File 'lib/polylingo_chat/config.rb', line 3 def timeout @timeout end |