Class: Legate::Configuration

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_loadBoolean

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 }`.

Returns:

  • (Boolean)

    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_nameSymbol

Returns Default model name to use if not specified in agent definition.

Returns:

  • (Symbol)

    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_temperatureFloat

Returns Default temperature to use if not specified in agent definition.

Returns:

  • (Float)

    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_serviceLegate::SessionService::Base

Returns The service used to manage agent session state.

Returns:



12
13
14
# File 'lib/legate/configuration.rb', line 12

def session_service
  @session_service
end

#webhooksLegate::Configuration::Webhooks (readonly)

Returns Webhook configuration.

Returns:



21
22
23
# File 'lib/legate/configuration.rb', line 21

def webhooks
  @webhooks
end