Class: Anthropic::Models::Beta::BetaRawMessageDeltaEvent::Delta

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/beta_raw_message_delta_event.rb,
sig/anthropic/models/beta/beta_raw_message_delta_event.rbs

Overview

See Also:

  • Anthropic::Models::Beta::BetaRawMessageDeltaEvent#delta

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

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

Methods included from Internal::Util::SorbetRuntimeSupport

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

Constructor Details

#initialize ⇒ Delta

Returns a new instance of Delta.

Parameters:

  • container: (Anthropic::Beta::BetaContainer, nil)
  • stop_details: (Anthropic::Beta::BetaRefusalStopDetails, nil)
  • stop_reason: (Anthropic::Models::Beta::beta_stop_reason, nil)
  • stop_sequence: (String, nil)


59
60
61
62
63
64
# File 'sig/anthropic/models/beta/beta_raw_message_delta_event.rbs', line 59

def initialize: (
  container: Anthropic::Beta::BetaContainer?,
  stop_details: Anthropic::Beta::BetaRefusalStopDetails?,
  stop_reason: Anthropic::Models::Beta::beta_stop_reason?,
  stop_sequence: String?
) -> void

Instance Attribute Details

#container ⇒ Anthropic::Models::Beta::BetaContainer?

Information about the container used in this request.

This will be non-null if a container tool (e.g. code execution) was used.

Parameters:

  • value (Anthropic::Beta::BetaContainer, nil)

Returns:



92
# File 'lib/anthropic/models/beta/beta_raw_message_delta_event.rb', line 92

required :container, -> { Anthropic::Beta::BetaContainer }, nil?: true

#stop_details ⇒ Anthropic::Models::Beta::BetaRefusalStopDetails?

Structured information about why model output stopped.

This is null when the stop_reason has no additional detail to report.

Parameters:

  • value (Anthropic::Beta::BetaRefusalStopDetails, nil)

Returns:



100
# File 'lib/anthropic/models/beta/beta_raw_message_delta_event.rb', line 100

required :stop_details, -> { Anthropic::Beta::BetaRefusalStopDetails }, nil?: true

#stop_reason ⇒ Symbol, ...

Parameters:

  • value (Anthropic::Models::Beta::beta_stop_reason, nil)

Returns:



105
# File 'lib/anthropic/models/beta/beta_raw_message_delta_event.rb', line 105

required :stop_reason, enum: -> { Anthropic::Beta::BetaStopReason }, nil?: true

#stop_sequence ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


110
# File 'lib/anthropic/models/beta/beta_raw_message_delta_event.rb', line 110

required :stop_sequence, String, nil?: true

Instance Method Details

#to_hash ⇒ { container: Anthropic::Beta::BetaContainer?, stop_details: Anthropic::Beta::BetaRefusalStopDetails?, stop_reason: Anthropic::Models::Beta::beta_stop_reason?, stop_sequence: String? }

Returns:

  • ({ container: Anthropic::Beta::BetaContainer?, stop_details: Anthropic::Beta::BetaRefusalStopDetails?, stop_reason: Anthropic::Models::Beta::beta_stop_reason?, stop_sequence: String? })


66
67
68
69
70
71
# File 'sig/anthropic/models/beta/beta_raw_message_delta_event.rbs', line 66

def to_hash: -> {
  container: Anthropic::Beta::BetaContainer?,
  stop_details: Anthropic::Beta::BetaRefusalStopDetails?,
  stop_reason: Anthropic::Models::Beta::beta_stop_reason?,
  stop_sequence: String?
}