Class: Phronomy::Configuration
- Inherits:
-
Object
- Object
- Phronomy::Configuration
- Defined in:
- lib/phronomy/configuration.rb
Overview
Holds global configuration for the entire framework. Configure via the Phronomy.configure block.
Instance Attribute Summary collapse
-
#before_completion ⇒ Object
Global before_completion hook callable (Proc / lambda).
-
#default_embedding_model ⇒ Object
Default embedding model name.
-
#default_memory ⇒ Object
Default Memory instance.
-
#default_model ⇒ Object
Default LLM model name (nil delegates to RubyLLM default).
-
#default_state_store ⇒ Object
Default StateStore instance (nil = no persistence).
-
#memory_async ⇒ Object
When true, all memory backends write asynchronously via ActiveJob by default.
-
#memory_job_queue ⇒ Object
ActiveJob queue name used for async memory writes (default: :default).
-
#recursion_limit ⇒ Object
Recursion limit for graph execution (default: 25).
-
#tracer ⇒ Object
Tracer instance.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
45 46 47 48 49 50 |
# File 'lib/phronomy/configuration.rb', line 45 def initialize @recursion_limit = 25 @tracer = Phronomy::Tracing::NullTracer.new @memory_async = false @memory_job_queue = :default end |
Instance Attribute Details
#before_completion ⇒ Object
Global before_completion hook callable (Proc / lambda). Called before every LLM request across all agents. Receives a Agent::BeforeCompletionContext; must return a Hash of params to merge, or nil to pass through unchanged.
40 41 42 |
# File 'lib/phronomy/configuration.rb', line 40 def before_completion @before_completion end |
#default_embedding_model ⇒ Object
Default embedding model name
17 18 19 |
# File 'lib/phronomy/configuration.rb', line 17 def @default_embedding_model end |
#default_memory ⇒ Object
Default Memory instance
23 24 25 |
# File 'lib/phronomy/configuration.rb', line 23 def default_memory @default_memory end |
#default_model ⇒ Object
Default LLM model name (nil delegates to RubyLLM default)
14 15 16 |
# File 'lib/phronomy/configuration.rb', line 14 def default_model @default_model end |
#default_state_store ⇒ Object
Default StateStore instance (nil = no persistence)
20 21 22 |
# File 'lib/phronomy/configuration.rb', line 20 def default_state_store @default_state_store end |
#memory_async ⇒ Object
When true, all memory backends write asynchronously via ActiveJob by default. Individual instances can still override with their own async: option. Requires ActiveJob to be available.
28 29 30 |
# File 'lib/phronomy/configuration.rb', line 28 def memory_async @memory_async end |
#memory_job_queue ⇒ Object
ActiveJob queue name used for async memory writes (default: :default)
31 32 33 |
# File 'lib/phronomy/configuration.rb', line 31 def memory_job_queue @memory_job_queue end |
#recursion_limit ⇒ Object
Recursion limit for graph execution (default: 25)
43 44 45 |
# File 'lib/phronomy/configuration.rb', line 43 def recursion_limit @recursion_limit end |
#tracer ⇒ Object
Tracer instance
34 35 36 |
# File 'lib/phronomy/configuration.rb', line 34 def tracer @tracer end |