Real-time streaming chat using the AI Platform Gateway with Server-Sent Events.
- Server-Sent Events (SSE) for streaming AI responses
- Multi-provider AI routing via platform gateway
- Vanilla JavaScript chat interface (no frameworks)
- Conversation history and session management
- AI Platform Gateway running (see example 01)
- Modern web browser with EventSource support
npm install
cp .env.example .env # configure gateway URL
npm startStreams AI responses in real-time using the platform gateway:
Browser -> Express Server -> AI Platform Gateway -> Any Provider -> Stream Back
Uses Server-Sent Events for real-time token streaming with automatic failover between providers via the gateway. The chat interface updates incrementally as each token arrives.