streaming

command
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

streaming shows the unified typed event channel for one run, consumed with a single for-range + type switch, closed out by Result(). A Driver that has no token stream still gets its final Result.Text printed once; streamed assistant text is never repeated.

Process chunks, transcript items, notices, tool calls, and text deltas are adaptor.Event values on the same channel. There is one channel and one drain obligation; a consumer simply omits unneeded cases from its type switch.

Usage:

go run ./examples/streaming -agent=codex
go run ./examples/streaming -agent=codex -cancel-after=3s

Directories

Path Synopsis
streaming/chat is a minimal typed-event chat UI in pure Go.
streaming/chat is a minimal typed-event chat UI in pure Go.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL