Class: Boxcars::Configuration
- Inherits:
-
Object
- Object
- Boxcars::Configuration
- Defined in:
- lib/boxcars.rb
Overview
Configuration contains gem settings
Instance Attribute Summary collapse
-
#cerebras_api_key(**kwargs) ⇒ String
The Cerebras API key either from arg or env.
-
#default_engine ⇒ Object
Returns the value of attribute default_engine.
-
#default_model ⇒ Object
Returns the value of attribute default_model.
-
#default_train ⇒ Object
Returns the value of attribute default_train.
-
#groq_api_key(**kwargs) ⇒ String
The Groq API key either from arg or env.
-
#log_generated ⇒ Object
Returns the value of attribute log_generated.
-
#log_prompts ⇒ Object
Returns the value of attribute log_prompts.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#observability_backend ⇒ Object
Returns the value of attribute observability_backend.
-
#openai_access_token(**kwargs) ⇒ String
The OpenAI Access Token either from arg or env.
-
#organization_id ⇒ Object
Returns the value of attribute organization_id.
-
#perplexity_api_key(**kwargs) ⇒ String
The Perplexity API key either from arg or env.
-
#serpapi_api_key(**kwargs) ⇒ String
The SerpAPI API key either from arg or env.
Instance Method Summary collapse
-
#anthropic_api_key(**kwargs) ⇒ String
The Anthropic API key either from arg or env.
-
#cohere_api_key(**kwargs) ⇒ String
The Cohere API key either from arg or env.
-
#gemini_api_key(**kwargs) ⇒ String
The Google AI API key either from arg or env.
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
-
#together_api_key(**kwargs) ⇒ String
The Together AI API key either from arg or env.
Constructor Details
#initialize ⇒ Configuration
34 35 36 37 38 39 |
# File 'lib/boxcars.rb', line 34 def initialize @organization_id = nil @logger = Rails.logger if defined?(Rails) @log_prompts = ENV.fetch("LOG_PROMPTS", false) @log_generated = ENV.fetch("LOG_GEN", false) end |
Instance Attribute Details
#cerebras_api_key(**kwargs) ⇒ String
67 68 69 |
# File 'lib/boxcars.rb', line 67 def cerebras_api_key(**kwargs) key_lookup(:cerebras_api_key, kwargs) end |
#default_engine ⇒ Object
Returns the value of attribute default_engine.
31 32 33 |
# File 'lib/boxcars.rb', line 31 def default_engine @default_engine end |
#default_model ⇒ Object
Returns the value of attribute default_model.
31 32 33 |
# File 'lib/boxcars.rb', line 31 def default_model @default_model end |
#default_train ⇒ Object
Returns the value of attribute default_train.
31 32 33 |
# File 'lib/boxcars.rb', line 31 def default_train @default_train end |
#groq_api_key(**kwargs) ⇒ String
62 63 64 |
# File 'lib/boxcars.rb', line 62 def groq_api_key(**kwargs) key_lookup(:groq_api_key, kwargs) end |
#log_generated ⇒ Object
Returns the value of attribute log_generated.
31 32 33 |
# File 'lib/boxcars.rb', line 31 def log_generated @log_generated end |
#log_prompts ⇒ Object
Returns the value of attribute log_prompts.
31 32 33 |
# File 'lib/boxcars.rb', line 31 def log_prompts @log_prompts end |
#logger ⇒ Object
Returns the value of attribute logger.
31 32 33 |
# File 'lib/boxcars.rb', line 31 def logger @logger end |
#observability_backend ⇒ Object
Returns the value of attribute observability_backend.
31 32 33 |
# File 'lib/boxcars.rb', line 31 def observability_backend @observability_backend end |
#openai_access_token(**kwargs) ⇒ String
42 43 44 |
# File 'lib/boxcars.rb', line 42 def openai_access_token(**kwargs) key_lookup(:openai_access_token, kwargs) end |
#organization_id ⇒ Object
Returns the value of attribute organization_id.
31 32 33 |
# File 'lib/boxcars.rb', line 31 def organization_id @organization_id end |
#perplexity_api_key(**kwargs) ⇒ String
82 83 84 |
# File 'lib/boxcars.rb', line 82 def perplexity_api_key(**kwargs) key_lookup(:perplexity_api_key, kwargs) end |
#serpapi_api_key(**kwargs) ⇒ String
47 48 49 |
# File 'lib/boxcars.rb', line 47 def serpapi_api_key(**kwargs) key_lookup(:serpapi_api_key, kwargs) end |
Instance Method Details
#anthropic_api_key(**kwargs) ⇒ String
52 53 54 |
# File 'lib/boxcars.rb', line 52 def anthropic_api_key(**kwargs) key_lookup(:anthropic_api_key, kwargs) end |
#cohere_api_key(**kwargs) ⇒ String
57 58 59 |
# File 'lib/boxcars.rb', line 57 def cohere_api_key(**kwargs) key_lookup(:cohere_api_key, kwargs) end |
#gemini_api_key(**kwargs) ⇒ String
72 73 74 |
# File 'lib/boxcars.rb', line 72 def gemini_api_key(**kwargs) key_lookup(:gemini_api_key, kwargs) end |
#together_api_key(**kwargs) ⇒ String
77 78 79 |
# File 'lib/boxcars.rb', line 77 def together_api_key(**kwargs) key_lookup(:together_api_key, kwargs) end |