Class: OllamaChat::ModelHandling::ModelMetadata
- Inherits:
-
Object
- Object
- OllamaChat::ModelHandling::ModelMetadata
- Defined in:
- lib/ollama_chat/model_handling.rb
Overview
A simple data structure representing metadata about a model.
Instance Attribute Summary collapse
-
#capabilities ⇒ Array<String>
readonly
the capabilities supported by the model.
-
#families ⇒ Array<String>
readonly
the families of the model.
-
#name ⇒ String
readonly
the name of the model.
-
#system ⇒ String
readonly
the system prompt associated with the model.
-
#thinking ⇒ Hash?
readonly
the thinking payload (
valuesanddefault) from Ollama ≥ 0.34.3, ornilwhen the server or model does not expose it.
Instance Method Summary collapse
-
#can?(capability) ⇒ true, false
Checks if the given capability is included in the object's capabilities.
Instance Attribute Details
#capabilities ⇒ Array<String> (readonly)
the capabilities supported by the model
31 32 33 |
# File 'lib/ollama_chat/model_handling.rb', line 31 def capabilities @capabilities end |
#families ⇒ Array<String> (readonly)
the families of the model
31 32 33 |
# File 'lib/ollama_chat/model_handling.rb', line 31 def families @families end |
#name ⇒ String (readonly)
the name of the model
31 32 33 |
# File 'lib/ollama_chat/model_handling.rb', line 31 def name @name end |
#system ⇒ String (readonly)
the system prompt associated with the model
31 32 33 |
# File 'lib/ollama_chat/model_handling.rb', line 31 def system @system end |
#thinking ⇒ Hash? (readonly)
the thinking payload (values and
default) from Ollama ≥ 0.34.3, or nil when the server or model does
not expose it
31 32 33 |
# File 'lib/ollama_chat/model_handling.rb', line 31 def thinking @thinking end |
Instance Method Details
#can?(capability) ⇒ true, false
Checks if the given capability is included in the object's capabilities.
38 39 40 |
# File 'lib/ollama_chat/model_handling.rb', line 38 def can?(capability) Array(capabilities).member?(capability) end |