Class: AiClient::LLM

Inherits:
ActiveHash::Base
  • Object
show all
Defined in:
lib/ai_client/llm.rb

Constant Summary collapse

DATA_PATH =
Pathname.new( __dir__ + '/models.yml')

Instance Method Summary collapse

Instance Method Details

#modelString

Extracts the model name from the LLM ID.

Returns:

  • (String)

    the model name.



23
# File 'lib/ai_client/llm.rb', line 23

def model     = id.split('/')[1]

#providerSymbol

Extracts the provider name from the LLM ID.

Returns:

  • (Symbol)

    the provider name.



29
# File 'lib/ai_client/llm.rb', line 29

def provider  = id.split('/')[0].to_sym

#to_hObject



31
# File 'lib/ai_client/llm.rb', line 31

def to_h = attributes