Class: Anthropic::Models::Beta::Sessions::Threads::EventStreamParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/anthropic/models/beta/sessions/threads/event_stream_params.rb,
sig/anthropic/models/beta/sessions/threads/event_stream_params.rbs

Overview

See Also:

  • Anthropic::Resources::Beta::Sessions::Threads::Events#stream_events

Constant Summary

Constants included from Internal::Type::RequestParameters

Internal::Type::RequestParameters::Anthropic

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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(session_id:, thread_id:, event_deltas: nil, betas: nil, request_options: {}) ⇒ Object

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

`event_

Parameters:



# File 'lib/anthropic/models/beta/sessions/threads/event_stream_params.rb', line 45

Instance Attribute Details

#betasArray<String, Symbol, Anthropic::Models::AnthropicBeta>?

Optional header to specify the beta version(s) you want to use.

Returns:



43
# File 'lib/anthropic/models/beta/sessions/threads/event_stream_params.rb', line 43

optional :betas, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::AnthropicBeta] }

#event_deltasArray<Symbol, Anthropic::Models::Beta::BetaManagedAgentsDeltaType>?

When set, this connection also receives streaming deltas (event_start, event_delta) while an event is being produced, before the event itself arrives. Deltas are best-effort; when the final event is produced it carries the complete content. A model request that ends early (an error or interrupt) produces no final event — its terminal span.model_request_end closes the preview. Accepts one or more event types to preview and may be repeated: agent.message streams content_delta fragments; agent.thinking is start-only — a signal that the agent has begun extended thinking, concluded by the agent.thinking event itself. Only previews of the requested event types are sent.



36
37
# File 'lib/anthropic/models/beta/sessions/threads/event_stream_params.rb', line 36

optional :event_deltas,
-> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::BetaManagedAgentsDeltaType] }

#session_idString

Parameters:

  • value (String)

Returns:

  • (String)


16
# File 'lib/anthropic/models/beta/sessions/threads/event_stream_params.rb', line 16

required :session_id, String

#thread_idString

Parameters:

  • value (String)

Returns:

  • (String)


21
# File 'lib/anthropic/models/beta/sessions/threads/event_stream_params.rb', line 21

required :thread_id, String

Instance Method Details

#to_hash{

Returns:

  • ({)


43
# File 'sig/anthropic/models/beta/sessions/threads/event_stream_params.rbs', line 43

def to_hash: -> {