Class: DebugAgent::Config

Inherits:
Struct
  • Object
show all
Defined in:
lib/debug_agent/config.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#base_pathObject

Returns the value of attribute base_path

Returns:

  • (Object)

    the current value of base_path



24
25
26
# File 'lib/debug_agent/config.rb', line 24

def base_path
  @base_path
end

#enabledObject

Returns the value of attribute enabled

Returns:

  • (Object)

    the current value of enabled



24
25
26
# File 'lib/debug_agent/config.rb', line 24

def enabled
  @enabled
end

#llmObject

Returns the value of attribute llm

Returns:

  • (Object)

    the current value of llm



24
25
26
# File 'lib/debug_agent/config.rb', line 24

def llm
  @llm
end

Class Method Details

.from_envObject



25
26
27
28
29
30
31
32
# File 'lib/debug_agent/config.rb', line 25

def self.from_env
  llm = LLMConfig.new.defaults!
  new(
    enabled: ENV.fetch('DEBUG_AGENT_ENABLED', 'true') == 'true',
    base_path: ENV.fetch('DEBUG_AGENT_BASE_PATH', '/agent'),
    llm: llm
  )
end