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
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(" Ollama model '\#{model_name}' is not installed.\n\n To install it, run:\n ollama pull \#{model_name}\n\n Or change the model in ~/.brainiac/brainiac.json \u2192 intent.model\n\n Available models can be listed with:\n ollama list\n MSG\nend\n".strip) |
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 |