Class: Legate::Configuration
- Inherits:
-
Object
- Object
- Legate::Configuration
- Defined in:
- lib/legate/configuration.rb,
lib/legate/configuration/webhooks.rb
Overview
Central configuration object for the Legate framework. Access via ‘Legate.config` after calling `Legate.configure`.
Defined Under Namespace
Classes: Webhooks
Instance Attribute Summary collapse
-
#allow_runtime_tool_load ⇒ Boolean
Whether the web UI may load AI-generated custom tools into the running process (this executes LLM-generated Ruby — see Legate::Generators::RuntimeToolLoader).
-
#default_model_name ⇒ Symbol
Default model name to use if not specified in agent definition.
-
#default_temperature ⇒ Float
Default temperature to use if not specified in agent definition.
-
#session_service ⇒ Legate::SessionService::Base
The service used to manage agent session state.
-
#webhooks ⇒ Legate::Configuration::Webhooks
readonly
Webhook configuration.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
30 31 32 33 34 35 36 37 |
# File 'lib/legate/configuration.rb', line 30 def initialize # Always use in-memory session service (Redis dependency removed) @session_service = Legate::SessionService::InMemory.new @default_model_name = 'gemini-3.5-flash' @default_temperature = 0.7 @webhooks = Legate::Configuration::Webhooks.new @allow_runtime_tool_load = ENV['RACK_ENV'] != 'production' end |
Instance Attribute Details
#allow_runtime_tool_load ⇒ Boolean
Returns Whether the web UI may load AI-generated custom tools into the running process (this executes LLM-generated Ruby — see Legate::Generators::RuntimeToolLoader). Defaults to ON outside production and OFF in production. Override explicitly via ‘Legate.configure { |c| c.allow_runtime_tool_load = true/false }`.
28 29 30 |
# File 'lib/legate/configuration.rb', line 28 def allow_runtime_tool_load @allow_runtime_tool_load end |
#default_model_name ⇒ Symbol
Returns Default model name to use if not specified in agent definition.
15 16 17 |
# File 'lib/legate/configuration.rb', line 15 def default_model_name @default_model_name end |
#default_temperature ⇒ Float
Returns Default temperature to use if not specified in agent definition.
18 19 20 |
# File 'lib/legate/configuration.rb', line 18 def default_temperature @default_temperature end |
#session_service ⇒ Legate::SessionService::Base
Returns The service used to manage agent session state.
12 13 14 |
# File 'lib/legate/configuration.rb', line 12 def session_service @session_service end |
#webhooks ⇒ Legate::Configuration::Webhooks (readonly)
Returns Webhook configuration.
21 22 23 |
# File 'lib/legate/configuration.rb', line 21 def webhooks @webhooks end |