Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Build LLM-powered apps with the Anthropic Claude API or SDK across Python, TypeScript, Java, Go, Ruby, C#, and PHP.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
ruby/claude-api/streaming.md
1# Streaming — Ruby23## Streaming45```ruby6stream = client.messages.stream(7model: :"claude-opus-4-8",8max_tokens: 64000,9messages: [{ role: "user", content: "Write a haiku" }]10)1112stream.text.each { |text| print(text) }13```1415---1617