Streaming Demo
Real-time Chat Streaming
Experience AI Kit's streaming capabilities with real-time message rendering, markdown support, and code highlighting.
Start a Conversation
Try one of the example prompts or type your own message to see streaming in action.
AI Kit Features Used
useAIStream
Hook for managing stream state
StreamingMessage
Real-time message rendering
MarkdownRenderer
Rich text formatting
CodeBlock
Syntax highlighting
Quick Start
import { useAIStream } from '@ainative/ai-kit';
const { stream, isStreaming } = useAIStream({
url: '/api/chat',
onChunk: (chunk) => {
setContent(prev => prev + chunk);
},
});