Exception: OllamaModelNotFoundError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- OllamaModelNotFoundError
- Defined in:
- lib/brainiac/intent.rb
Overview
Custom error for missing Ollama models — provides actionable install instructions.
Instance Attribute Summary collapse
-
#endpoint ⇒ Object
readonly
Returns the value of attribute endpoint.
-
#model_name ⇒ Object
readonly
Returns the value of attribute model_name.
Instance Method Summary collapse
-
#initialize(model_name, endpoint) ⇒ OllamaModelNotFoundError
constructor
A new instance of OllamaModelNotFoundError.
Constructor Details
#initialize(model_name, endpoint) ⇒ OllamaModelNotFoundError
Returns a new instance of OllamaModelNotFoundError.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/brainiac/intent.rb', line 70 def initialize(model_name, endpoint) @model_name = model_name @endpoint = endpoint super(<<~MSG.strip) Ollama model '#{model_name}' is not installed. To install it, run: ollama pull #{model_name} Or change the model in ~/.brainiac/brainiac.json → intent.model Available models can be listed with: ollama list MSG end |
Instance Attribute Details
#endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
68 69 70 |
# File 'lib/brainiac/intent.rb', line 68 def endpoint @endpoint end |
#model_name ⇒ Object (readonly)
Returns the value of attribute model_name.
68 69 70 |
# File 'lib/brainiac/intent.rb', line 68 def model_name @model_name end |