Save this block to your file system
Add required npm packages
pnpm i @ai-sdk/react ai zod lucide-react @upstash/ratelimit @upstash/redis
Install shadcn/ui components
pnpm dlx shadcn@latest add button card tooltip prompt-input conversation message web-preview loader suggestions
Set up AI-powered components
npx ai-elements@latest
Configure OpenAI for AI-powered features
Optional: Configure Upstash for Rate Limiting