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.
-
#azure_ai_auth_token ⇒ Object
Returns the value of attribute azure_ai_auth_token.
-
#azure_api_base ⇒ Object
Returns the value of attribute azure_api_base.
-
#azure_api_key ⇒ Object
Returns the value of attribute azure_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.
96 97 98 99 100 |
# File 'lib/agents.rb', line 96 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.
89 90 91 |
# File 'lib/agents.rb', line 89 def anthropic_api_key @anthropic_api_key end |
#azure_ai_auth_token ⇒ Object
Returns the value of attribute azure_ai_auth_token.
89 90 91 |
# File 'lib/agents.rb', line 89 def azure_ai_auth_token @azure_ai_auth_token end |
#azure_api_base ⇒ Object
Returns the value of attribute azure_api_base.
89 90 91 |
# File 'lib/agents.rb', line 89 def azure_api_base @azure_api_base end |
#azure_api_key ⇒ Object
Returns the value of attribute azure_api_key.
89 90 91 |
# File 'lib/agents.rb', line 89 def azure_api_key @azure_api_key end |
#bedrock_api_key ⇒ Object
Returns the value of attribute bedrock_api_key.
89 90 91 |
# File 'lib/agents.rb', line 89 def bedrock_api_key @bedrock_api_key end |
#bedrock_region ⇒ Object
Returns the value of attribute bedrock_region.
89 90 91 |
# File 'lib/agents.rb', line 89 def bedrock_region @bedrock_region end |
#bedrock_secret_key ⇒ Object
Returns the value of attribute bedrock_secret_key.
89 90 91 |
# File 'lib/agents.rb', line 89 def bedrock_secret_key @bedrock_secret_key end |
#bedrock_session_token ⇒ Object
Returns the value of attribute bedrock_session_token.
89 90 91 |
# File 'lib/agents.rb', line 89 def bedrock_session_token @bedrock_session_token end |
#debug ⇒ Object
General configuration
94 95 96 |
# File 'lib/agents.rb', line 94 def debug @debug end |
#deepseek_api_key ⇒ Object
Returns the value of attribute deepseek_api_key.
89 90 91 |
# File 'lib/agents.rb', line 89 def deepseek_api_key @deepseek_api_key end |
#default_model ⇒ Object
General configuration
94 95 96 |
# File 'lib/agents.rb', line 94 def default_model @default_model end |
#gemini_api_key ⇒ Object
Returns the value of attribute gemini_api_key.
89 90 91 |
# File 'lib/agents.rb', line 89 def gemini_api_key @gemini_api_key end |
#ollama_api_base ⇒ Object
Returns the value of attribute ollama_api_base.
89 90 91 |
# File 'lib/agents.rb', line 89 def ollama_api_base @ollama_api_base end |
#openai_api_base ⇒ Object
Provider API keys and configuration
88 89 90 |
# File 'lib/agents.rb', line 88 def openai_api_base @openai_api_base end |
#openai_api_key ⇒ Object
Provider API keys and configuration
88 89 90 |
# File 'lib/agents.rb', line 88 def openai_api_key @openai_api_key end |
#openai_organization_id ⇒ Object
Provider API keys and configuration
88 89 90 |
# File 'lib/agents.rb', line 88 def openai_organization_id @openai_organization_id end |
#openai_project_id ⇒ Object
Provider API keys and configuration
88 89 90 |
# File 'lib/agents.rb', line 88 def openai_project_id @openai_project_id end |
#openrouter_api_key ⇒ Object
Returns the value of attribute openrouter_api_key.
89 90 91 |
# File 'lib/agents.rb', line 89 def openrouter_api_key @openrouter_api_key end |
#request_timeout ⇒ Object
General configuration
94 95 96 |
# File 'lib/agents.rb', line 94 def request_timeout @request_timeout end |
Instance Method Details
#configured? ⇒ Boolean
Check if at least one provider is configured
104 105 106 107 108 |
# File 'lib/agents.rb', line 104 def configured? @openai_api_key || @anthropic_api_key || @gemini_api_key || @deepseek_api_key || @openrouter_api_key || @ollama_api_base || @bedrock_api_key || (@azure_api_base && (@azure_api_key || @azure_ai_auth_token)) end |