Electron running usage on every streamed chunk
Electron chat completions accept stream_options.continuous_usage_stats. With include_usage: true, every streamed chunk carries a usage block with the token counts so far, not just the last one. It has no effect without include_usage.
What changed
continuous_usage_statsadded to the chat completions API reference and the Supported Parameters page.- New “Running usage on every chunk” section on the Streaming page.