Use any OpenAI-compatible API (OpenAI, Claude, Assisters) with the openai npm package. Stream responses via Server-Sent Events, store conversation history in Postgres, and add function calling for tool use.
openai clientpnpm add openai ai @ai-sdk/openai import OpenAI from 'openai';
const ai = new OpenAI({
baseURL: 'https://assisters.dev/api/v1',
apiKey: process.env.ASSISTERS_API_KEY!,
});
app/api/chat/route.ts: const stream = await ai.chat.completions.create({
model: 'assisters-chat-v1',
messages,
stream: true,
});
return new Response(stream.toReadableStream());
useChat hook.messages table with conversation_id./moderate endpoint before responding.@upstash/ratelimit or self-hosted Redis: 20 msg/min per user.| Tool | Use |
|---|---|
| Vercel AI SDK | Chat UI primitives |
| Assisters | OpenAI-compatible gateway |
| Supabase | History + auth |
| Langfuse | Observability |
| Upstash / Redis | Rate limiting |
A production chatbot is a weekend project in 2026 with OpenAI-compatible APIs and the Vercel AI SDK. Self-host the model gateway (Assisters) to control costs and data. Try Misar Dev to generate the entire scaffold from a prompt.
It's tempting to dive headfirst into complex architectures when building a RAG chatbot—vector databases, fine-tuned embeddings, and retrieva…

How to build an AI chatbot without code in 2026 — step-by-step guide using Voiceflow, Botpress, or Landbot. Intent mapping, flows, and deplo…

Website content is one of the richest sources of information your business has. Every help article, FAQ, service description, and policy pag…


Comments
Sign in to join the conversation
No comments yet. Be the first to share your thoughts!