Dsxir. Stream. Event
(dsxir v0.5.0)
Copy Markdown
Unified streaming event surfaced to a :stream consumer of
Dsxir.Predictor.Predict.
Predict translates each Dsxir.LM.StreamChunk into one of these and, when
listen: names output fields, injects :field_delta events carrying
marker-stripped field content. A single sink therefore sees the whole stream;
a UI answer-box filters to :field_delta for its field while a raw-output view
consumes :token. The :type tag selects the payload:
:token—datais the raw text delta straight from the model (markers and all); the unfiltered firehose.:field_delta—datais a fragment of a listened output field's value, markers stripped;fieldnames the field. Only emitted for fields named inlisten:.:reasoning—datais a reasoning-text fragment.:tool_call—datais%{id, name, arguments_delta}.:usage—datais a%Dsxir.Cost{}.:done— terminal success;datais the final accumulator (oftennil).:error— terminal failure;datais aDsxir.Errors.LM.*.
field is nil for every type except :field_delta.