Class: Llmshim::Model

Inherits:
Struct
  • Object
show all
Defined in:
lib/llmshim/types.rb

Overview

A single model entry from GET /v1/models.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



78
79
80
# File 'lib/llmshim/types.rb', line 78

def id
  @id
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



78
79
80
# File 'lib/llmshim/types.rb', line 78

def name
  @name
end

#providerObject

Returns the value of attribute provider

Returns:

  • (Object)

    the current value of provider



78
79
80
# File 'lib/llmshim/types.rb', line 78

def provider
  @provider
end

Class Method Details

.from_hash(hash) ⇒ Object



79
80
81
# File 'lib/llmshim/types.rb', line 79

def self.from_hash(hash)
  new(id: hash["id"], provider: hash["provider"], name: hash["name"])
end