Optional
modeOptional
onA function to run at the end of a stream. This is useful if you want to do something with the stream after it's done, like log token usage.
Optional
onA function that runs for each token. This is useful if you want to sum tokens used as they're returned.
Generated using TypeDoc
Whether to return tokens or raw events.