Class: Rubino::Agent::FallbackChain::Entry

Inherits:
Struct
  • Object
show all
Defined in:
lib/rubino/agent/fallback_chain.rb

Overview

One backend in the chain. provider/model are required to be usable; an entry missing either is treated as invalid and skipped on advance.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key

Returns:

  • (Object)

    the current value of api_key



39
40
41
# File 'lib/rubino/agent/fallback_chain.rb', line 39

def api_key
  @api_key
end

#base_urlObject

Returns the value of attribute base_url

Returns:

  • (Object)

    the current value of base_url



39
40
41
# File 'lib/rubino/agent/fallback_chain.rb', line 39

def base_url
  @base_url
end

#modelObject

Returns the value of attribute model

Returns:

  • (Object)

    the current value of model



39
40
41
# File 'lib/rubino/agent/fallback_chain.rb', line 39

def model
  @model
end

#providerObject

Returns the value of attribute provider

Returns:

  • (Object)

    the current value of provider



39
40
41
# File 'lib/rubino/agent/fallback_chain.rb', line 39

def provider
  @provider
end

Instance Method Details

#usable?Boolean

Returns:

  • (Boolean)


40
41
42
# File 'lib/rubino/agent/fallback_chain.rb', line 40

def usable?
  !provider.to_s.strip.empty? && !model.to_s.strip.empty?
end