ai.stream.TurnMeta

Turn metadata as it arrives on the wire. Providers send stop_reason and token counts on different events; each TurnMeta carries what its event had and TurnStream folds non-null fields together (last write wins).

Reference version

Signature

class ai.stream.TurnMeta

Turn metadata as it arrives on the wire. Providers send stop_reason and token counts on different events; each TurnMeta carries what its event had and TurnStream folds non-null fields together (last write wins).

Source:<builtin>/ai/ns_stream/stream.bamlbytes 42154325

Fields

input_tokens

int | null

output_tokens

int | null