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_model ⇒ Object
Default LLM model name (nil delegates to RubyLLM default).
-
#recursion_limit ⇒ Object
Recursion limit for graph execution (default: 25).
-
#trace_pii ⇒ Object
When true (default), user input and LLM output are recorded in trace spans.
-
#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.
36 37 38 39 40 |
# File 'lib/phronomy/configuration.rb', line 36 def initialize @recursion_limit = 25 @tracer = Phronomy::Tracing::NullTracer.new @trace_pii = true 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.
26 27 28 |
# File 'lib/phronomy/configuration.rb', line 26 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_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 |
#recursion_limit ⇒ Object
Recursion limit for graph execution (default: 25)
29 30 31 |
# File 'lib/phronomy/configuration.rb', line 29 def recursion_limit @recursion_limit end |
#trace_pii ⇒ Object
When true (default), user input and LLM output are recorded in trace spans. Set to false in privacy-sensitive environments to prevent PII from reaching the tracing backend (OTel, Langfuse, etc.).
34 35 36 |
# File 'lib/phronomy/configuration.rb', line 34 def trace_pii @trace_pii end |
#tracer ⇒ Object
Tracer instance
20 21 22 |
# File 'lib/phronomy/configuration.rb', line 20 def tracer @tracer end |