Class: Aws::BedrockRuntime::EventStreams::InvokeModelWithBidirectionalStreamInput

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeInvokeModelWithBidirectionalStreamInput

Returns a new instance of InvokeModelWithBidirectionalStreamInput.



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



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

def event_emitter
  @event_emitter
end

Instance Method Details

#signal_chunk_event(params = {}) ⇒ Object

Parameters:

  • params (Hash) (defaults to: {})

    a customizable set of options

Options Hash (params):

  • :bytes (String, StringIO, File)

    The audio content for the bidirectional input.



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

def signal_chunk_event(params = {})
  @event_emitter.emit(:chunk, params)
end

#signal_end_streamObject



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

def signal_end_stream
  @event_emitter.emit(:end_stream, {})
end