Class: RubyLLM::Configuration
- Inherits:
- 
      Object
      
        - Object
- RubyLLM::Configuration
 
- Defined in:
- lib/ruby_llm/configuration.rb
Overview
Configuration class for RubyLLM settings
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. 
- 
  
    
      #default_provider  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute default_provider. 
- 
  
    
      #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.
| 8 9 10 11 12 | # File 'lib/ruby_llm/configuration.rb', line 8 def initialize @request_timeout = 30 @default_provider = :openai @default_model = 'gpt-3.5-turbo' end | 
Instance Attribute Details
#anthropic_api_key ⇒ Object
Returns the value of attribute anthropic_api_key.
| 6 7 8 | # File 'lib/ruby_llm/configuration.rb', line 6 def anthropic_api_key @anthropic_api_key end | 
#default_model ⇒ Object
Returns the value of attribute default_model.
| 6 7 8 | # File 'lib/ruby_llm/configuration.rb', line 6 def default_model @default_model end | 
#default_provider ⇒ Object
Returns the value of attribute default_provider.
| 6 7 8 | # File 'lib/ruby_llm/configuration.rb', line 6 def default_provider @default_provider end | 
#openai_api_key ⇒ Object
Returns the value of attribute openai_api_key.
| 6 7 8 | # File 'lib/ruby_llm/configuration.rb', line 6 def openai_api_key @openai_api_key end | 
#request_timeout ⇒ Object
Returns the value of attribute request_timeout.
| 6 7 8 | # File 'lib/ruby_llm/configuration.rb', line 6 def request_timeout @request_timeout end | 
Instance Method Details
#provider_settings ⇒ Object
| 14 15 16 17 18 19 | # File 'lib/ruby_llm/configuration.rb', line 14 def provider_settings @provider_settings ||= { openai: ProviderSettings.new, anthropic: ProviderSettings.new } end |