Class: Protege::InferenceChunkEvent
- Defined in:
- lib/protege/events/inference_chunk_event.rb
Overview
Fired for each token chunk during streaming inference.
Instance Attribute Summary
Attributes inherited from Event
Instance Method Summary collapse
- #chunk ⇒ Object
-
#chunk_content ⇒ String?
The decoded text of the streamed chunk, if any.
- #persona ⇒ Object
- #thread ⇒ Object
Methods inherited from Event
#[], all, channel, #correlation_id, emit, #initialize, subscribe
Constructor Details
This class inherits a constructor from Protege::Event
Instance Method Details
#chunk ⇒ Object
10 |
# File 'lib/protege/events/inference_chunk_event.rb', line 10 def chunk = self[:chunk] |
#chunk_content ⇒ String?
The decoded text of the streamed chunk, if any.
15 |
# File 'lib/protege/events/inference_chunk_event.rb', line 15 def chunk_content = chunk && chunk[:content].to_s |
#persona ⇒ Object
8 |
# File 'lib/protege/events/inference_chunk_event.rb', line 8 def persona = self[:persona] |
#thread ⇒ Object
9 |
# File 'lib/protege/events/inference_chunk_event.rb', line 9 def thread = self[:thread] |