Class: RubyLLM::ModelRegistry::JsonSource

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_llm/model_registry.rb

Overview

Reads model registry data from the configured JSON file.

Instance Method Summary collapse

Constructor Details

#initialize(file = nil) ⇒ JsonSource

Returns a new instance of JsonSource.



8
9
10
# File 'lib/ruby_llm/model_registry.rb', line 8

def initialize(file = nil)
  @file = file
end

Instance Method Details

#readObject



12
13
14
# File 'lib/ruby_llm/model_registry.rb', line 12

def read
  Models.read_from_json(@file || RubyLLM.config.model_registry_file)
end