Class: RubyLLM::ModelRegistry::JsonSource
- Inherits:
-
Object
- Object
- RubyLLM::ModelRegistry::JsonSource
- Defined in:
- lib/ruby_llm/model_registry.rb
Overview
Reads model registry data from the configured JSON file.
Instance Method Summary collapse
-
#initialize(file = nil) ⇒ JsonSource
constructor
A new instance of JsonSource.
- #read ⇒ Object
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
#read ⇒ Object
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 |