Module: Anthropic::Models::Beta::BetaOutputBehavior

Extended by:
Internal::Type::Union
Defined in:
lib/anthropic/models/beta/beta_output_behavior.rb

Overview

Which memory store a dream writes its result to. Defaults to create_new when left out of a create request.

Defined Under Namespace

Modules: Type

Class Method Summary collapse

Methods included from Internal::Type::Union

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

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:, **args) ⇒ Anthropic::Models::Beta::BetaOutputBehaviorCreateNew, Anthropic::Models::Beta::BetaOutputBehaviorUpdateExisting

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

Some parameter documentations has been truncated, see Anthropic::Models::Beta::BetaOutputBehavior for more details.

Parameters:

  • type (Symbol, Anthropic::Models::Beta::BetaOutputBehavior::Type, String)
  • args (Hash{Symbol=>Object})

    Attributes for the chosen variant.

    @option args [String] :memory_store_id The ID of the memory store for the dream to write its result to (memstore_...)

Returns:

Raises:

  • (ArgumentError)


50
51
52
53
54
55
56
57
58
59
# File 'lib/anthropic/models/beta/beta_output_behavior.rb', line 50

def self.new(type:, **args)
  case type.to_sym
  when :create_new
    Anthropic::Beta::BetaOutputBehaviorCreateNew.new(**args)
  when :update_existing
    Anthropic::Beta::BetaOutputBehaviorUpdateExisting.new(**args)
  else
    raise ArgumentError, "unknown type: #{type}"
  end
end

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/beta/beta_output_behavior.rb', line 29

.variantsArray(Anthropic::Models::Beta::BetaOutputBehaviorCreateNew, Anthropic::Models::Beta::BetaOutputBehaviorUpdateExisting)



# File 'lib/anthropic/models/beta/beta_output_behavior.rb', line 33