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



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

def capabilities
  @capabilities
end

#nameString (readonly)

the name of the model

Returns:

  • (String)

    the current value of name



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

def name
  @name
end

#systemString (readonly)

the system prompt associated with the model

Returns:

  • (String)

    the current value of system



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

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



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

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