Class: Langfuse::Configuration
- Inherits:
-
Object
- Object
- Langfuse::Configuration
- Extended by:
- T::Sig
- 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.
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/langfuse/configuration.rb', line 26 def initialize # Default configuration with environment variable fallbacks @public_key = T.let(ENV['LANGFUSE_PUBLIC_KEY'], T.nilable(String)) @secret_key = T.let(ENV['LANGFUSE_SECRET_KEY'], T.nilable(String)) @host = T.let(ENV.fetch('LANGFUSE_HOST', 'https://us.cloud.langfuse.com'), String) @batch_size = T.let(ENV.fetch('LANGFUSE_BATCH_SIZE', '10').to_i, Integer) @flush_interval = T.let(ENV.fetch('LANGFUSE_FLUSH_INTERVAL', '60').to_i, Integer) @debug = T.let(ENV.fetch('LANGFUSE_DEBUG', 'false') == 'true', T::Boolean) @disable_at_exit_hook = T.let(false, T::Boolean) @shutdown_timeout = T.let(ENV.fetch('LANGFUSE_SHUTDOWN_TIMEOUT', '5').to_i, Integer) @logger = T.let(Logger.new($stdout), Logger) end |
Instance Attribute Details
#batch_size ⇒ Object
Returns the value of attribute batch_size.
17 18 19 |
# File 'lib/langfuse/configuration.rb', line 17 def batch_size @batch_size end |
#debug ⇒ Object
Returns the value of attribute debug.
20 21 22 |
# File 'lib/langfuse/configuration.rb', line 20 def debug @debug end |
#disable_at_exit_hook ⇒ Object
Returns the value of attribute disable_at_exit_hook.
20 21 22 |
# File 'lib/langfuse/configuration.rb', line 20 def disable_at_exit_hook @disable_at_exit_hook end |
#flush_interval ⇒ Object
Returns the value of attribute flush_interval.
17 18 19 |
# File 'lib/langfuse/configuration.rb', line 17 def flush_interval @flush_interval end |
#host ⇒ Object
Returns the value of attribute host.
14 15 16 |
# File 'lib/langfuse/configuration.rb', line 14 def host @host end |
#logger ⇒ Object
Returns the value of attribute logger.
23 24 25 |
# File 'lib/langfuse/configuration.rb', line 23 def logger @logger end |
#public_key ⇒ Object
Returns the value of attribute public_key.
11 12 13 |
# File 'lib/langfuse/configuration.rb', line 11 def public_key @public_key end |
#secret_key ⇒ Object
Returns the value of attribute secret_key.
11 12 13 |
# File 'lib/langfuse/configuration.rb', line 11 def secret_key @secret_key end |
#shutdown_timeout ⇒ Object
Returns the value of attribute shutdown_timeout.
17 18 19 |
# File 'lib/langfuse/configuration.rb', line 17 def shutdown_timeout @shutdown_timeout end |