Class: Aws::BedrockRuntime::EventStreams::ConverseStreamOutput

Inherits:
Object
  • Object
show all
Defined in:
lib/aws-sdk-bedrockruntime/event_streams.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConverseStreamOutput

Returns a new instance of ConverseStreamOutput.



14
15
16
# File 'lib/aws-sdk-bedrockruntime/event_streams.rb', line 14

def initialize
  @event_emitter = Aws::EventEmitter.new
end

Instance Attribute Details

#event_emitterObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns Aws::EventEmitter.

Returns:

  • Aws::EventEmitter



93
94
95
# File 'lib/aws-sdk-bedrockruntime/event_streams.rb', line 93

def event_emitter
  @event_emitter
end

Instance Method Details

#on_content_block_delta_event(&block) ⇒ Object



26
27
28
# File 'lib/aws-sdk-bedrockruntime/event_streams.rb', line 26

def on_content_block_delta_event(&block)
  @event_emitter.on(:content_block_delta, block) if block_given?
end

#on_content_block_start_event(&block) ⇒ Object



22
23
24
# File 'lib/aws-sdk-bedrockruntime/event_streams.rb', line 22

def on_content_block_start_event(&block)
  @event_emitter.on(:content_block_start, block) if block_given?
end

#on_content_block_stop_event(&block) ⇒ Object



30
31
32
# File 'lib/aws-sdk-bedrockruntime/event_streams.rb', line 30

def on_content_block_stop_event(&block)
  @event_emitter.on(:content_block_stop, block) if block_given?
end

#on_error_event(&block) ⇒ Object



62
63
64
# File 'lib/aws-sdk-bedrockruntime/event_streams.rb', line 62

def on_error_event(&block)
  @event_emitter.on(:error, block) if block_given?
end

#on_event(&block) ⇒ Object



74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# File 'lib/aws-sdk-bedrockruntime/event_streams.rb', line 74

def on_event(&block)
  on_message_start_event(&block)
  on_content_block_start_event(&block)
  on_content_block_delta_event(&block)
  on_content_block_stop_event(&block)
  on_message_stop_event(&block)
  (&block)
  on_internal_server_exception_event(&block)
  on_model_stream_error_exception_event(&block)
  on_validation_exception_event(&block)
  on_throttling_exception_event(&block)
  on_service_unavailable_exception_event(&block)
  on_error_event(&block)
  on_initial_response_event(&block)
  on_unknown_event(&block)
end

#on_initial_response_event(&block) ⇒ Object



66
67
68
# File 'lib/aws-sdk-bedrockruntime/event_streams.rb', line 66

def on_initial_response_event(&block)
  @event_emitter.on(:initial_response, block) if block_given?
end

#on_internal_server_exception_event(&block) ⇒ Object



42
43
44
# File 'lib/aws-sdk-bedrockruntime/event_streams.rb', line 42

def on_internal_server_exception_event(&block)
  @event_emitter.on(:internal_server_exception, block) if block_given?
end

#on_message_start_event(&block) ⇒ Object



18
19
20
# File 'lib/aws-sdk-bedrockruntime/event_streams.rb', line 18

def on_message_start_event(&block)
  @event_emitter.on(:message_start, block) if block_given?
end

#on_message_stop_event(&block) ⇒ Object



34
35
36
# File 'lib/aws-sdk-bedrockruntime/event_streams.rb', line 34

def on_message_stop_event(&block)
  @event_emitter.on(:message_stop, block) if block_given?
end

#on_metadata_event(&block) ⇒ Object



38
39
40
# File 'lib/aws-sdk-bedrockruntime/event_streams.rb', line 38

def (&block)
  @event_emitter.on(:metadata, block) if block_given?
end

#on_model_stream_error_exception_event(&block) ⇒ Object



46
47
48
# File 'lib/aws-sdk-bedrockruntime/event_streams.rb', line 46

def on_model_stream_error_exception_event(&block)
  @event_emitter.on(:model_stream_error_exception, block) if block_given?
end

#on_service_unavailable_exception_event(&block) ⇒ Object



58
59
60
# File 'lib/aws-sdk-bedrockruntime/event_streams.rb', line 58

def on_service_unavailable_exception_event(&block)
  @event_emitter.on(:service_unavailable_exception, block) if block_given?
end

#on_throttling_exception_event(&block) ⇒ Object



54
55
56
# File 'lib/aws-sdk-bedrockruntime/event_streams.rb', line 54

def on_throttling_exception_event(&block)
  @event_emitter.on(:throttling_exception, block) if block_given?
end

#on_unknown_event(&block) ⇒ Object



70
71
72
# File 'lib/aws-sdk-bedrockruntime/event_streams.rb', line 70

def on_unknown_event(&block)
  @event_emitter.on(:unknown_event, block) if block_given?
end

#on_validation_exception_event(&block) ⇒ Object



50
51
52
# File 'lib/aws-sdk-bedrockruntime/event_streams.rb', line 50

def on_validation_exception_event(&block)
  @event_emitter.on(:validation_exception, block) if block_given?
end