Class: Agents::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/agents.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_keyObject

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_keyObject

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_regionObject

Returns the value of attribute bedrock_region.



86
87
88
# File 'lib/agents.rb', line 86

def bedrock_region
  @bedrock_region
end

#bedrock_secret_keyObject

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_tokenObject

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

#debugObject

General configuration



90
91
92
# File 'lib/agents.rb', line 90

def debug
  @debug
end

#deepseek_api_keyObject

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_modelObject

General configuration



90
91
92
# File 'lib/agents.rb', line 90

def default_model
  @default_model
end

#gemini_api_keyObject

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_baseObject

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_baseObject

Provider API keys and configuration



85
86
87
# File 'lib/agents.rb', line 85

def openai_api_base
  @openai_api_base
end

#openai_api_keyObject

Provider API keys and configuration



85
86
87
# File 'lib/agents.rb', line 85

def openai_api_key
  @openai_api_key
end

#openai_organization_idObject

Provider API keys and configuration



85
86
87
# File 'lib/agents.rb', line 85

def openai_organization_id
  @openai_organization_id
end

#openai_project_idObject

Provider API keys and configuration



85
86
87
# File 'lib/agents.rb', line 85

def openai_project_id
  @openai_project_id
end

#openrouter_api_keyObject

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_timeoutObject

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

Returns:

  • (Boolean)

    True if any provider has an API key



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