03_streaming

command
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Streaming response example.

This example demonstrates how to use streaming to get responses token-by-token as they're generated, providing a better user experience for long responses.

To run:

export OPENAI_API_KEY="your-key-here"
go run examples/03_streaming/main.go

Jump to

Keyboard shortcuts

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