class RubyLLM::Configuration
Global configuration for RubyLLM
Public Class Methods
Source
# File lib/ruby_llm/configuration.rb, line 72 def initialize self.class.send(:defaults).each do |key, default| value = default.respond_to?(:call) ? instance_exec(&default) : default public_send("#{key}=", value) end end
# File lib/ruby_llm/configuration.rb, line 25 def register_provider_options(options) Array(options).each { |key| option(key, nil) } end
Public Instance Methods
Source
# File lib/ruby_llm/configuration.rb, line 79 def instance_variables super.reject { |ivar| ivar.to_s.match?(/_id|_key|_secret|_token$/) } end
Calls superclass method
Source
# File lib/ruby_llm/configuration.rb, line 83 def log_regexp_timeout=(value) if value.nil? @log_regexp_timeout = nil elsif Regexp.respond_to?(:timeout) @log_regexp_timeout = value else RubyLLM.logger.warn("log_regexp_timeout is not supported on Ruby #{RUBY_VERSION}") @log_regexp_timeout = value end end