Class: OllamaChat::Database::Models::ModelOptions
- Inherits:
-
Object
- Object
- OllamaChat::Database::Models::ModelOptions
- Defined in:
- lib/ollama_chat/database/models/model_options.rb
Overview
Sequel model for persisting model-specific configurations as a JSON blob. Each record is uniquely identified by its model name.
Instance Method Summary collapse
-
#created_at(value) ⇒ Time?
The timestamp when these options were first recorded.
-
#id(value) ⇒ Integer
The primary key for the model options entry.
-
#model_name(value) ⇒ String
The unique name of the Ollama model these options apply to.
-
#options(value) ⇒ String
A JSON-serialized string containing the model-specific configuration options.
-
#updated_at(value) ⇒ Time?
The timestamp of the last update to these options.
-
#validate ⇒ Object
Validates the model options.
Instance Method Details
#created_at=(value) ⇒ Time?
Returns The timestamp when these options were first recorded.
|
|
# File 'lib/ollama_chat/database/models/model_options.rb', line 18
|
#id=(value) ⇒ Integer
Returns The primary key for the model options entry.
|
|
# File 'lib/ollama_chat/database/models/model_options.rb', line 18
|
#model_name=(value) ⇒ String
Returns The unique name of the Ollama model these options apply to.
|
|
# File 'lib/ollama_chat/database/models/model_options.rb', line 18
|
#options=(value) ⇒ String
Returns A JSON-serialized string containing the model-specific configuration options.
|
|
# File 'lib/ollama_chat/database/models/model_options.rb', line 18
|
#updated_at=(value) ⇒ Time?
Returns The timestamp of the last update to these options.
|
|
# File 'lib/ollama_chat/database/models/model_options.rb', line 18
|
#validate ⇒ Object
Validates the model options.
Ensures that both the model_name and options are present.
11 12 13 14 15 16 |
# File 'lib/ollama_chat/database/models/model_options.rb', line 11 def validate super validates_presence :model_name validates_unique :model_name validates_presence :options end |