Class: OmniAI::Chat::Stream
- Inherits:
-
Object
- Object
- OmniAI::Chat::Stream
- Defined in:
- lib/omniai/chat/stream.rb
Overview
A stream given when streaming.
Instance Method Summary collapse
-
#initialize(response:) ⇒ Stream
constructor
A new instance of Stream.
- #stream! {|OmniAI::Chat::Chunk| ... } ⇒ Object
Constructor Details
#initialize(response:) ⇒ Stream
Returns a new instance of Stream.
9 10 11 12 |
# File 'lib/omniai/chat/stream.rb', line 9 def initialize(response:) @response = response @parser = EventStreamParser::Parser.new end |