Class: Envoy::Configuration
- Inherits:
-
Object
- Object
- Envoy::Configuration
- Defined in:
- lib/envoy/configuration.rb
Instance Attribute Summary collapse
-
#actor_resolver ⇒ Object
Returns the value of attribute actor_resolver.
-
#authenticate ⇒ Object
Returns the value of attribute authenticate.
-
#available_models ⇒ Object
Returns the value of attribute available_models.
-
#default_model ⇒ Object
Returns the value of attribute default_model.
-
#llm ⇒ Object
Returns a fresh LLM runner.
-
#provider ⇒ Object
Returns the value of attribute provider.
-
#system_preamble ⇒ Object
Returns the value of attribute system_preamble.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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_resolver ⇒ Object
Returns the value of attribute actor_resolver.
3 4 5 |
# File 'lib/envoy/configuration.rb', line 3 def actor_resolver @actor_resolver end |
#authenticate ⇒ Object
Returns the value of attribute authenticate.
3 4 5 |
# File 'lib/envoy/configuration.rb', line 3 def authenticate @authenticate end |
#available_models ⇒ Object
Returns the value of attribute available_models.
3 4 5 |
# File 'lib/envoy/configuration.rb', line 3 def available_models @available_models end |
#default_model ⇒ Object
Returns the value of attribute default_model.
3 4 5 |
# File 'lib/envoy/configuration.rb', line 3 def default_model @default_model end |
#llm ⇒ Object
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 |
#provider ⇒ Object
Returns the value of attribute provider.
3 4 5 |
# File 'lib/envoy/configuration.rb', line 3 def provider @provider end |
#system_preamble ⇒ Object
Returns the value of attribute system_preamble.
3 4 5 |
# File 'lib/envoy/configuration.rb', line 3 def system_preamble @system_preamble end |