Class: RubyLLM::Configuration
- Inherits:
-
Object
- Object
- RubyLLM::Configuration
- Defined in:
- lib/ruby_llm/configuration.rb
Instance Attribute Summary collapse
-
#anthropic_api_key ⇒ Object
Returns the value of attribute anthropic_api_key.
-
#default_model ⇒ Object
Returns the value of attribute default_model.
-
#openai_api_key ⇒ Object
Returns the value of attribute openai_api_key.
-
#request_timeout ⇒ Object
Returns the value of attribute request_timeout.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #provider_settings ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 10 |
# File 'lib/ruby_llm/configuration.rb', line 7 def initialize @request_timeout = 30 @default_model = 'gpt-4o-mini' end |
Instance Attribute Details
#anthropic_api_key ⇒ Object
Returns the value of attribute anthropic_api_key.
5 6 7 |
# File 'lib/ruby_llm/configuration.rb', line 5 def anthropic_api_key @anthropic_api_key end |
#default_model ⇒ Object
Returns the value of attribute default_model.
5 6 7 |
# File 'lib/ruby_llm/configuration.rb', line 5 def default_model @default_model end |
#openai_api_key ⇒ Object
Returns the value of attribute openai_api_key.
5 6 7 |
# File 'lib/ruby_llm/configuration.rb', line 5 def openai_api_key @openai_api_key end |
#request_timeout ⇒ Object
Returns the value of attribute request_timeout.
5 6 7 |
# File 'lib/ruby_llm/configuration.rb', line 5 def request_timeout @request_timeout end |
Instance Method Details
#provider_settings ⇒ Object
12 13 14 15 16 17 |
# File 'lib/ruby_llm/configuration.rb', line 12 def provider_settings @provider_settings ||= { openai: ProviderSettings.new, anthropic: ProviderSettings.new } end |