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.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/brainiac/intent.rb', line 86 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.
84 85 86 |
# File 'lib/brainiac/intent.rb', line 84 def endpoint @endpoint end |
#model_name ⇒ Object (readonly)
Returns the value of attribute model_name.
84 85 86 |
# File 'lib/brainiac/intent.rb', line 84 def model_name @model_name end |