Module: Anthropic::Models::Beta::BetaMessageThreadParam
- Extended by:
- Internal::Type::Union
- Defined in:
- lib/anthropic/models/beta/beta_message_thread_param.rb,
sig/anthropic/models/beta/beta_message_thread_param.rbs
Overview
Server-held conversation state (a Thread). {"type": "create"} asks the server
to hold this conversation's state under the response's id;
{"type": "continue", "previous_message_id": ...} resumes from a previous
response so only the new turn's messages are sent. The response shape is
unchanged.
Defined Under Namespace
Modules: Type
Class Method Summary collapse
-
.new(type:, **args) ⇒ Anthropic::Models::Beta::BetaThreadCreateParams, Anthropic::Models::Beta::BetaThreadContinueParams
Creates a new instance of the variant class whose
typematches the given value, passing the remaining arguments to its constructor. - .values ⇒ Array<Symbol>
- .variants ⇒ Array(Anthropic::Models::Beta::BetaThreadCreateParams, Anthropic::Models::Beta::BetaThreadContinueParams)
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::BetaThreadCreateParams .new(type:, previous_message_id:) ⇒ Anthropic::Beta::BetaThreadContinueParams .new(type:, previous_message_id:) ⇒ Anthropic::Models::Beta::beta_message_thread_param
Creates a new instance of the variant class whose type matches the given
value, passing the remaining arguments to its constructor.
46 47 48 49 50 51 52 53 54 55 |
# File 'lib/anthropic/models/beta/beta_message_thread_param.rb', line 46 def self.new(type:, **args) case type.to_sym when :create Anthropic::Beta::BetaThreadCreateParams.new(**args) when :continue Anthropic::Beta::BetaThreadContinueParams.new(**args) else raise ArgumentError, "unknown type: #{type}" end end |
.values ⇒ Array<Symbol>
|
|
# File 'lib/anthropic/models/beta/beta_message_thread_param.rb', line 28
|
.variants ⇒ Array(Anthropic::Models::Beta::BetaThreadCreateParams, Anthropic::Models::Beta::BetaThreadContinueParams)
|
|
# File 'lib/anthropic/models/beta/beta_message_thread_param.rb', line 32
|