Class: ActiveAgent::Providers::Anthropic::Options
- Inherits:
-
Common::BaseModel
- Object
- Common::BaseModel
- ActiveAgent::Providers::Anthropic::Options
- Defined in:
- lib/active_agent/providers/anthropic/options.rb
Instance Method Summary collapse
-
#extra_headers ⇒ Object
Anthropic gem handles beta headers differently via client.beta rather than via extra_headers in request_options.
-
#initialize(kwargs = {}) ⇒ Options
constructor
A new instance of Options.
- #serialize ⇒ Object
Methods inherited from Common::BaseModel
#<=>, #==, attribute, #deep_compact, #deep_dup, delegate_attributes, drop_attributes, inherited, #inspect, keys, #merge!, required_attributes, #to_h, #to_hash
Constructor Details
#initialize(kwargs = {}) ⇒ Options
Returns a new instance of Options.
22 23 24 25 26 27 28 |
# File 'lib/active_agent/providers/anthropic/options.rb', line 22 def initialize(kwargs = {}) kwargs = kwargs.deep_symbolize_keys if kwargs.respond_to?(:deep_symbolize_keys) super(**deep_compact(kwargs.except(:default_url_options).merge( api_key: kwargs[:api_key] || resolve_access_token(kwargs), ))) end |
Instance Method Details
#extra_headers ⇒ Object
Anthropic gem handles beta headers differently via client.beta rather than via extra_headers in request_options
36 37 38 |
# File 'lib/active_agent/providers/anthropic/options.rb', line 36 def extra_headers {} end |
#serialize ⇒ Object
30 31 32 |
# File 'lib/active_agent/providers/anthropic/options.rb', line 30 def serialize super.except(:anthropic_beta) end |