Class: OllamaChat::ModelHandling::ModelMetadata

Inherits:
Struct
  • Object
show all
Defined in:
lib/ollama_chat/model_handling.rb

Overview

A simple data structure representing metadata about a model.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#capabilitiesArray<String> (readonly)

the capabilities supported by the model

Returns:

  • (Array<String>)

    the current value of capabilities



26
27
28
# File 'lib/ollama_chat/model_handling.rb', line 26

def capabilities
  @capabilities
end

#familiesArray<String> (readonly)

the families of the model

Returns:

  • (Array<String>)

    the current value of families



26
27
28
# File 'lib/ollama_chat/model_handling.rb', line 26

def families
  @families
end

#nameString (readonly)

the name of the model

Returns:

  • (String)

    the current value of name



26
27
28
# File 'lib/ollama_chat/model_handling.rb', line 26

def name
  @name
end

#systemString (readonly)

the system prompt associated with the model

Returns:

  • (String)

    the current value of system



26
27
28
# File 'lib/ollama_chat/model_handling.rb', line 26

def system
  @system
end

Instance Method Details

#can?(capability) ⇒ true, false

Checks if the given capability is included in the object's capabilities.

Parameters:

  • capability (String)

    the capability to check for

Returns:

  • (true, false)

    true if the capability is present, false otherwise



31
32
33
# File 'lib/ollama_chat/model_handling.rb', line 31

def can?(capability)
  Array(capabilities).member?(capability)
end