AI

RAGBot Starter — An Astra DB and OpenAI chatbot

RAGBot Starter — An Astra DB and OpenAI chatbot
Type: Code
Framework: Next.js
CSS: Tailwind
Database: Astra DB

The RAGBot Starter is a project starter for creating a chatbot that integrates with Astra DB and OpenAI. It’s designed to be easy to deploy and use, focusing on performance and usability. Here are its key features and instructions to get started:

Features:

  1. Astra DB Integration: Easily store and retrieve data from your Astra DB database.
  2. OpenAI Integration: Utilize OpenAI’s capabilities to generate intelligent responses.
  3. Easy Deployment: Deploy your chatbot to Vercel with just a few clicks.
  4. Customizable: Modify and extend the chatbot to suit your specific needs.

Getting Started:

Prerequisites:

Setup:

  1. Clone this repository to your local machine.
  2. Install the project dependencies by running npm install in your terminal.
  3. Set up the following environment variables in your IDE or .env file:
    • ASTRA_DB_NAMESPACE: The existing Astra Namespace/Keyspace in a vector-enabled DB.
    • OPENAI_API_KEY: Your API key for OpenAI.
    • ASTRA_DB_ENDPOINT: Your Astra DB vector database endpoint.
    • ASTRA_DB_APPLICATION_TOKEN: The generated app token for your Astra database. To create a new token, go to your database’s Connect tab and click Generate Token (your Application Token begins with AstraCS:…).
  4. Populate your database with sample data by running npm run seed in your terminal.

Running the Project:

  • Start the development server by running npm run dev in your terminal. You can access the chatbot at http://localhost:3000 in your browser.

Deployment:

  • You can easily deploy your chatbot to Vercel by clicking the deployment button provided in the project.
  • Remember to set your environment variables to the values obtained when setting up your Astra DB and OpenAI accounts.

Note:

Before deploying to production, it’s recommended to remove the seed script (npm run seed) from the build step to avoid populating your production database with sample data.

Enjoy building your chatbot with the RAGBot Starter

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.