Module: Anthropic::Models::Beta::BetaManagedAgentsModelConfig::Effort

Extended by:
Internal::Type::Union
Defined in:
lib/anthropic/models/beta/beta_managed_agents_model_config.rb,
sig/anthropic/models/beta/beta_managed_agents_model_config.rbs

Overview

How hard Claude works on each inference call. One of low, medium, high, xhigh, max. Always present; resolved to the per-model default at save time when not supplied.

See Also:

  • Anthropic::Models::Beta::BetaManagedAgentsModelConfig#effort

Defined Under Namespace

Modules: Type

Class Method Summary collapse

Methods included from Internal::Type::Union

==, ===, coerce, derefed_variants, dump, hash, inspect, to_sorbet_type

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Class Method Details

.new(type:) ⇒ Anthropic::Beta::BetaManagedAgentsEffortLow .new(type:) ⇒ Anthropic::Beta::BetaManagedAgentsEffortMedium .new(type:) ⇒ Anthropic::Beta::BetaManagedAgentsEffortHigh .new(type:) ⇒ Anthropic::Beta::BetaManagedAgentsEffortXhigh .new(type:) ⇒ Anthropic::Beta::BetaManagedAgentsEffortMax .new(type:) ⇒ Anthropic::Models::Beta::BetaManagedAgentsModelConfig::effort

Creates a new instance of the variant class whose type matches the given value, passing the remaining arguments to its constructor.

Overloads:

  • .new(type:) ⇒ Anthropic::Beta::BetaManagedAgentsEffortLow

    Parameters:

    • type: (:low, "low")

    Returns:

    • (Anthropic::Beta::BetaManagedAgentsEffortLow)
  • .new(type:) ⇒ Anthropic::Beta::BetaManagedAgentsEffortMedium

    Parameters:

    • type: (:medium, "medium")

    Returns:

    • (Anthropic::Beta::BetaManagedAgentsEffortMedium)
  • .new(type:) ⇒ Anthropic::Beta::BetaManagedAgentsEffortHigh

    Parameters:

    • type: (:high, "high")

    Returns:

    • (Anthropic::Beta::BetaManagedAgentsEffortHigh)
  • .new(type:) ⇒ Anthropic::Beta::BetaManagedAgentsEffortXhigh

    Parameters:

    • type: (:xhigh, "xhigh")

    Returns:

    • (Anthropic::Beta::BetaManagedAgentsEffortXhigh)
  • .new(type:) ⇒ Anthropic::Beta::BetaManagedAgentsEffortMax

    Parameters:

    • type: (:max, "max")

    Returns:

    • (Anthropic::Beta::BetaManagedAgentsEffortMax)
  • .new(type:) ⇒ Anthropic::Models::Beta::BetaManagedAgentsModelConfig::effort

    Parameters:

    • type: (Anthropic::Models::Beta::BetaManagedAgentsModelConfig::Effort::type_, String)

    Returns:

    • (Anthropic::Models::Beta::BetaManagedAgentsModelConfig::effort)

Parameters:

Returns:

Raises:

  • (ArgumentError)


103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/anthropic/models/beta/beta_managed_agents_model_config.rb', line 103

def self.new(type:, **args)
  case type.to_sym
  when :low
    Anthropic::Beta::BetaManagedAgentsEffortLow.new(**args)
  when :medium
    Anthropic::Beta::BetaManagedAgentsEffortMedium.new(**args)
  when :high
    Anthropic::Beta::BetaManagedAgentsEffortHigh.new(**args)
  when :xhigh
    Anthropic::Beta::BetaManagedAgentsEffortXhigh.new(**args)
  when :max
    Anthropic::Beta::BetaManagedAgentsEffortMax.new(**args)
  else
    raise ArgumentError, "unknown type: #{type}"
  end
end

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/beta/beta_managed_agents_model_config.rb', line 87

.variants ⇒ Array(Anthropic::Models::Beta::BetaManagedAgentsEffortLow, Anthropic::Models::Beta::BetaManagedAgentsEffortMedium, Anthropic::Models::Beta::BetaManagedAgentsEffortHigh, Anthropic::Models::Beta::BetaManagedAgentsEffortXhigh, Anthropic::Models::Beta::BetaManagedAgentsEffortMax)



# File 'lib/anthropic/models/beta/beta_managed_agents_model_config.rb', line 91