Class: Envoy::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/envoy/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



7
8
9
10
11
12
13
14
# File 'lib/envoy/configuration.rb', line 7

def initialize
  @provider         = :anthropic
  @default_model    = "claude-sonnet-4-5"
  @available_models = [ "claude-sonnet-4-5", "claude-opus-4-1" ]
  @authenticate     = ->(controller) { }
  @actor_resolver   = ->(controller) { nil }
  @system_preamble  = "You are a helpful assistant embedded in a Rails app."
end

Instance Attribute Details

#actor_resolverObject

Returns the value of attribute actor_resolver.



3
4
5
# File 'lib/envoy/configuration.rb', line 3

def actor_resolver
  @actor_resolver
end

#authenticateObject

Returns the value of attribute authenticate.



3
4
5
# File 'lib/envoy/configuration.rb', line 3

def authenticate
  @authenticate
end

#available_modelsObject

Returns the value of attribute available_models.



3
4
5
# File 'lib/envoy/configuration.rb', line 3

def available_models
  @available_models
end

#default_modelObject

Returns the value of attribute default_model.



3
4
5
# File 'lib/envoy/configuration.rb', line 3

def default_model
  @default_model
end

#llmObject

Returns a fresh LLM runner. Overridable in tests via config.llm = ....



17
18
19
# File 'lib/envoy/configuration.rb', line 17

def llm
  @llm ||= ->(**opts) { Envoy::LLM.new(**opts) }
end

#providerObject

Returns the value of attribute provider.



3
4
5
# File 'lib/envoy/configuration.rb', line 3

def provider
  @provider
end

#system_preambleObject

Returns the value of attribute system_preamble.



3
4
5
# File 'lib/envoy/configuration.rb', line 3

def system_preamble
  @system_preamble
end