Exception: Legion::LLM::ModelNotAllowed
- Defined in:
- lib/legion/llm/errors.rb
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#provider ⇒ Object
readonly
Returns the value of attribute provider.
Instance Method Summary collapse
-
#initialize(message = nil, provider: nil, model: nil) ⇒ ModelNotAllowed
constructor
A new instance of ModelNotAllowed.
Methods inherited from LLMError
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( = nil, provider: nil, model: nil) @provider = provider @model = model super( || "model #{model.inspect} is not permitted by the configured policy for provider #{provider.inspect}") end |
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model.
45 46 47 |
# File 'lib/legion/llm/errors.rb', line 45 def model @model end |
#provider ⇒ Object (readonly)
Returns the value of attribute provider.
45 46 47 |
# File 'lib/legion/llm/errors.rb', line 45 def provider @provider end |