Documentation
supastarter for Next.jsAI

Using the AI chatbot

Learn how to use and extend the integrated AI chatbot in your supastarter app.

supastarter includes a fully working AI chatbot with a chat history and a context window. It is using the Vercel AI SDK to connect to ChatGPT.

To learn more about the AI chatbot, you can read the Vercel AI SDK documentation.

AI chatbot

It includes the following features:

  • Multiple chat sessions
  • Chat history
  • Context window
  • Streaming responses

As all parts of supastarter, the chatbot is fully customizable and can be extended/adjusted to fit your needs.

You can find the code for the AI chatbot in the apps/web/modules/saas/ai/components/AiChat.tsx file.

The API logic is located in the packages/api/src/routes/ai.ts file.

On this page

No Headings