Exception: ActiveGenie::WithoutAvailableProviderError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/active_genie/errors/without_available_provider_error.rb

Constant Summary collapse

TEXT =
<<~TEXT
  Missing at least one credentialed provider to proceed.

  To configure ActiveGenie, you can either:
  1. Set up global configuration:
     ```ruby
     ActiveGenie.configure do |config|
       config.providers.default = 'openai'
       config.providers.openai.api_key = 'your_api_key'
       # ... other configuration options
     end
     ```

  2. Or pass configuration directly to the method call:
     ```ruby
     ActiveGenie::Extractor.call(
       arg1,
       arg2,
       config: {
         providers: {
           default: 'openai',
           openai: {
             api_key: 'your_api_key'
           }
         }
       }
     )
     ```
TEXT

Instance Method Summary collapse

Constructor Details

#initializeWithoutAvailableProviderError

Returns a new instance of WithoutAvailableProviderError.



35
36
37
# File 'lib/active_genie/errors/without_available_provider_error.rb', line 35

def initialize
  super(TEXT)
end