Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Streaming Chat

Real-time streaming chat using the AI Platform Gateway with Server-Sent Events.

What This Demonstrates

  • 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

Prerequisites

  • AI Platform Gateway running (see example 01)
  • Modern web browser with EventSource support

Quick Start

npm install
cp .env.example .env  # configure gateway URL
npm start

How It Works

Streams 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.