Module: OllamaChat::ModelHandling
- Included in:
- Chat
- Defined in:
- lib/ollama_chat/model_handling.rb
Overview
A module that provides functionality for managing Ollama models, including checking model availability, pulling models from remote servers, and handling model presence verification.
This module encapsulates the logic for interacting with Ollama models, ensuring that required models are available locally before attempting to use them in chat sessions. It handles both local model verification and remote model retrieval when necessary.
Defined Under Namespace
Classes: ModelMetadata
Instance Method Summary collapse
-
#get_stored_model_options(model_name) ⇒ Hash
Retrieves the stored model options from the database for a given model name.
Instance Method Details
#get_stored_model_options(model_name) ⇒ Hash
Retrieves the stored model options from the database for a given model name.
40 41 42 43 |
# File 'lib/ollama_chat/model_handling.rb', line 40 def (model_name) models::ModelOptions.where(model_name:).first&.. to_h.symbolize_keys_recursive end |