Class: Langfuse::Configuration
- Inherits:
-
Object
- Object
- Langfuse::Configuration
- Defined in:
- lib/langfuse/configuration.rb
Instance Attribute Summary collapse
-
#batch_size ⇒ Object
Returns the value of attribute batch_size.
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#disable_at_exit_hook ⇒ Object
Returns the value of attribute disable_at_exit_hook.
-
#flush_interval ⇒ Object
Returns the value of attribute flush_interval.
-
#host ⇒ Object
Returns the value of attribute host.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#public_key ⇒ Object
Returns the value of attribute public_key.
-
#secret_key ⇒ Object
Returns the value of attribute secret_key.
-
#shutdown_timeout ⇒ Object
Returns the value of attribute shutdown_timeout.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/langfuse/configuration.rb', line 7 def initialize # Default configuration with environment variable fallbacks @public_key = ENV['LANGFUSE_PUBLIC_KEY'] @secret_key = ENV['LANGFUSE_SECRET_KEY'] @host = ENV.fetch('LANGFUSE_HOST', 'https://us.cloud.langfuse.com') @batch_size = ENV.fetch('LANGFUSE_BATCH_SIZE', '10').to_i @flush_interval = ENV.fetch('LANGFUSE_FLUSH_INTERVAL', '60').to_i @debug = ENV.fetch('LANGFUSE_DEBUG', 'false') == 'true' @disable_at_exit_hook = false @shutdown_timeout = ENV.fetch('LANGFUSE_SHUTDOWN_TIMEOUT', '5').to_i @logger = Logger.new(STDOUT) end |
Instance Attribute Details
#batch_size ⇒ Object
Returns the value of attribute batch_size.
3 4 5 |
# File 'lib/langfuse/configuration.rb', line 3 def batch_size @batch_size end |
#debug ⇒ Object
Returns the value of attribute debug.
3 4 5 |
# File 'lib/langfuse/configuration.rb', line 3 def debug @debug end |
#disable_at_exit_hook ⇒ Object
Returns the value of attribute disable_at_exit_hook.
3 4 5 |
# File 'lib/langfuse/configuration.rb', line 3 def disable_at_exit_hook @disable_at_exit_hook end |
#flush_interval ⇒ Object
Returns the value of attribute flush_interval.
3 4 5 |
# File 'lib/langfuse/configuration.rb', line 3 def flush_interval @flush_interval end |
#host ⇒ Object
Returns the value of attribute host.
3 4 5 |
# File 'lib/langfuse/configuration.rb', line 3 def host @host end |
#logger ⇒ Object
Returns the value of attribute logger.
3 4 5 |
# File 'lib/langfuse/configuration.rb', line 3 def logger @logger end |
#public_key ⇒ Object
Returns the value of attribute public_key.
3 4 5 |
# File 'lib/langfuse/configuration.rb', line 3 def public_key @public_key end |
#secret_key ⇒ Object
Returns the value of attribute secret_key.
3 4 5 |
# File 'lib/langfuse/configuration.rb', line 3 def secret_key @secret_key end |
#shutdown_timeout ⇒ Object
Returns the value of attribute shutdown_timeout.
3 4 5 |
# File 'lib/langfuse/configuration.rb', line 3 def shutdown_timeout @shutdown_timeout end |