Class: DSPy::Subscribers::LangfuseSubscriber::LangfuseConfig
- Inherits:
-
Object
- Object
- DSPy::Subscribers::LangfuseSubscriber::LangfuseConfig
- Extended by:
- T::Sig
- Defined in:
- lib/dspy/subscribers/langfuse_subscriber.rb
Overview
Configuration for Langfuse integration
Instance Attribute Summary collapse
-
#calculate_costs ⇒ Object
Returns the value of attribute calculate_costs.
-
#default_tags ⇒ Object
Returns the value of attribute default_tags.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#host ⇒ Object
Returns the value of attribute host.
-
#log_completions ⇒ Object
Returns the value of attribute log_completions.
-
#log_prompts ⇒ Object
Returns the value of attribute log_prompts.
-
#public_key ⇒ Object
Returns the value of attribute public_key.
-
#secret_key ⇒ Object
Returns the value of attribute secret_key.
-
#trace_evaluations ⇒ Object
Returns the value of attribute trace_evaluations.
-
#trace_lm_calls ⇒ Object
Returns the value of attribute trace_lm_calls.
-
#trace_optimizations ⇒ Object
Returns the value of attribute trace_optimizations.
Instance Method Summary collapse
-
#initialize ⇒ LangfuseConfig
constructor
A new instance of LangfuseConfig.
Constructor Details
#initialize ⇒ LangfuseConfig
Returns a new instance of LangfuseConfig.
56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/dspy/subscribers/langfuse_subscriber.rb', line 56 def initialize @enabled = !!(defined?(Langfuse) && ENV['LANGFUSE_SECRET_KEY']) @public_key = ENV['LANGFUSE_PUBLIC_KEY'] @secret_key = ENV['LANGFUSE_SECRET_KEY'] @host = ENV['LANGFUSE_HOST'] || 'https://cloud.langfuse.com' @trace_optimizations = true @trace_lm_calls = true @trace_evaluations = true @log_prompts = true @log_completions = true @calculate_costs = true @default_tags = { 'framework' => 'dspy-ruby' } end |
Instance Attribute Details
#calculate_costs ⇒ Object
Returns the value of attribute calculate_costs.
50 51 52 |
# File 'lib/dspy/subscribers/langfuse_subscriber.rb', line 50 def calculate_costs @calculate_costs end |
#default_tags ⇒ Object
Returns the value of attribute default_tags.
53 54 55 |
# File 'lib/dspy/subscribers/langfuse_subscriber.rb', line 53 def @default_tags end |
#enabled ⇒ Object
Returns the value of attribute enabled.
23 24 25 |
# File 'lib/dspy/subscribers/langfuse_subscriber.rb', line 23 def enabled @enabled end |
#host ⇒ Object
Returns the value of attribute host.
32 33 34 |
# File 'lib/dspy/subscribers/langfuse_subscriber.rb', line 32 def host @host end |
#log_completions ⇒ Object
Returns the value of attribute log_completions.
47 48 49 |
# File 'lib/dspy/subscribers/langfuse_subscriber.rb', line 47 def log_completions @log_completions end |
#log_prompts ⇒ Object
Returns the value of attribute log_prompts.
44 45 46 |
# File 'lib/dspy/subscribers/langfuse_subscriber.rb', line 44 def log_prompts @log_prompts end |
#public_key ⇒ Object
Returns the value of attribute public_key.
26 27 28 |
# File 'lib/dspy/subscribers/langfuse_subscriber.rb', line 26 def public_key @public_key end |
#secret_key ⇒ Object
Returns the value of attribute secret_key.
29 30 31 |
# File 'lib/dspy/subscribers/langfuse_subscriber.rb', line 29 def secret_key @secret_key end |
#trace_evaluations ⇒ Object
Returns the value of attribute trace_evaluations.
41 42 43 |
# File 'lib/dspy/subscribers/langfuse_subscriber.rb', line 41 def trace_evaluations @trace_evaluations end |
#trace_lm_calls ⇒ Object
Returns the value of attribute trace_lm_calls.
38 39 40 |
# File 'lib/dspy/subscribers/langfuse_subscriber.rb', line 38 def trace_lm_calls @trace_lm_calls end |
#trace_optimizations ⇒ Object
Returns the value of attribute trace_optimizations.
35 36 37 |
# File 'lib/dspy/subscribers/langfuse_subscriber.rb', line 35 def trace_optimizations @trace_optimizations end |