Exception: Legion::LLM::ModelNotAllowed

Inherits:
LLMError
  • Object
show all
Defined in:
lib/legion/llm/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LLMError

#retryable?

Constructor Details

#initialize(message = nil, provider: nil, model: nil) ⇒ ModelNotAllowed

Returns a new instance of ModelNotAllowed.



47
48
49
50
51
# File 'lib/legion/llm/errors.rb', line 47

def initialize(message = nil, provider: nil, model: nil)
  @provider = provider
  @model = model
  super(message || "model #{model.inspect} is not permitted by the configured policy for provider #{provider.inspect}")
end

Instance Attribute Details

#modelObject (readonly)

Returns the value of attribute model.



45
46
47
# File 'lib/legion/llm/errors.rb', line 45

def model
  @model
end

#providerObject (readonly)

Returns the value of attribute provider.



45
46
47
# File 'lib/legion/llm/errors.rb', line 45

def provider
  @provider
end