Class: Agents::Configuration
- Inherits:
-
Object
- Object
- Agents::Configuration
- Defined in:
- lib/agents.rb
Instance Attribute Summary collapse
-
#anthropic_api_key ⇒ Object
Returns the value of attribute anthropic_api_key.
-
#bedrock_api_key ⇒ Object
Returns the value of attribute bedrock_api_key.
-
#bedrock_region ⇒ Object
Returns the value of attribute bedrock_region.
-
#bedrock_secret_key ⇒ Object
Returns the value of attribute bedrock_secret_key.
-
#bedrock_session_token ⇒ Object
Returns the value of attribute bedrock_session_token.
-
#debug ⇒ Object
General configuration.
-
#deepseek_api_key ⇒ Object
Returns the value of attribute deepseek_api_key.
-
#default_model ⇒ Object
General configuration.
-
#gemini_api_key ⇒ Object
Returns the value of attribute gemini_api_key.
-
#ollama_api_base ⇒ Object
Returns the value of attribute ollama_api_base.
-
#openai_api_base ⇒ Object
Provider API keys and configuration.
-
#openai_api_key ⇒ Object
Provider API keys and configuration.
-
#openai_organization_id ⇒ Object
Provider API keys and configuration.
-
#openai_project_id ⇒ Object
Provider API keys and configuration.
-
#openrouter_api_key ⇒ Object
Returns the value of attribute openrouter_api_key.
-
#request_timeout ⇒ Object
General configuration.
Instance Method Summary collapse
-
#configured? ⇒ Boolean
Check if at least one provider is configured.
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
92 93 94 95 96 |
# File 'lib/agents.rb', line 92 def initialize @default_model = "gpt-4o-mini" @request_timeout = 120 @debug = false end |
Instance Attribute Details
#anthropic_api_key ⇒ Object
Returns the value of attribute anthropic_api_key.
86 87 88 |
# File 'lib/agents.rb', line 86 def anthropic_api_key @anthropic_api_key end |
#bedrock_api_key ⇒ Object
Returns the value of attribute bedrock_api_key.
86 87 88 |
# File 'lib/agents.rb', line 86 def bedrock_api_key @bedrock_api_key end |
#bedrock_region ⇒ Object
Returns the value of attribute bedrock_region.
86 87 88 |
# File 'lib/agents.rb', line 86 def bedrock_region @bedrock_region end |
#bedrock_secret_key ⇒ Object
Returns the value of attribute bedrock_secret_key.
86 87 88 |
# File 'lib/agents.rb', line 86 def bedrock_secret_key @bedrock_secret_key end |
#bedrock_session_token ⇒ Object
Returns the value of attribute bedrock_session_token.
86 87 88 |
# File 'lib/agents.rb', line 86 def bedrock_session_token @bedrock_session_token end |
#debug ⇒ Object
General configuration
90 91 92 |
# File 'lib/agents.rb', line 90 def debug @debug end |
#deepseek_api_key ⇒ Object
Returns the value of attribute deepseek_api_key.
86 87 88 |
# File 'lib/agents.rb', line 86 def deepseek_api_key @deepseek_api_key end |
#default_model ⇒ Object
General configuration
90 91 92 |
# File 'lib/agents.rb', line 90 def default_model @default_model end |
#gemini_api_key ⇒ Object
Returns the value of attribute gemini_api_key.
86 87 88 |
# File 'lib/agents.rb', line 86 def gemini_api_key @gemini_api_key end |
#ollama_api_base ⇒ Object
Returns the value of attribute ollama_api_base.
86 87 88 |
# File 'lib/agents.rb', line 86 def ollama_api_base @ollama_api_base end |
#openai_api_base ⇒ Object
Provider API keys and configuration
85 86 87 |
# File 'lib/agents.rb', line 85 def openai_api_base @openai_api_base end |
#openai_api_key ⇒ Object
Provider API keys and configuration
85 86 87 |
# File 'lib/agents.rb', line 85 def openai_api_key @openai_api_key end |
#openai_organization_id ⇒ Object
Provider API keys and configuration
85 86 87 |
# File 'lib/agents.rb', line 85 def openai_organization_id @openai_organization_id end |
#openai_project_id ⇒ Object
Provider API keys and configuration
85 86 87 |
# File 'lib/agents.rb', line 85 def openai_project_id @openai_project_id end |
#openrouter_api_key ⇒ Object
Returns the value of attribute openrouter_api_key.
86 87 88 |
# File 'lib/agents.rb', line 86 def openrouter_api_key @openrouter_api_key end |
#request_timeout ⇒ Object
General configuration
90 91 92 |
# File 'lib/agents.rb', line 90 def request_timeout @request_timeout end |
Instance Method Details
#configured? ⇒ Boolean
Check if at least one provider is configured
100 101 102 103 104 |
# File 'lib/agents.rb', line 100 def configured? @openai_api_key || @anthropic_api_key || @gemini_api_key || @deepseek_api_key || @openrouter_api_key || @ollama_api_base || @bedrock_api_key end |