This starter uses the incredible Hono framework 🔥 in Workers application to show off some streaming approaches
# Install dependencies
npm install
# Run dev server
npm run dev
# Deploy to Region: Earth
npm run deploy
Adding stream: true
to your AI.run
call returns Server Sent Events. You can consume these using the EventSource interface.
# Change to your deployed project name
curl http://your-project.workers.dev/stream-event-source
This shows off the streamText
Hono helper.
# Change to your deployed project name
# -N parameter allows for no buffering in curl
curl http://your-project.workers.dev/stream-text -N