Hello Hono AI#
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
Server Sent Events (SSE) - EventSource#
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
Stream Text#
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