Skip to content

Latest commit

 

History

History
48 lines (35 loc) · 1.44 KB

README.md

File metadata and controls

48 lines (35 loc) · 1.44 KB

DataViz Chatbot

AI chatbot for data visualization and analytics

Features · Running locally · Connecting Databases


Features

  • Next.js App Router
  • React Server Components (RSCs), Suspense, and Server Actions
  • Vercel AI SDK for streaming chat UI

Running locally

First, you need to create either a Vercel KV or Upstash Redis DB to store the chatbot state. After that, you will need to use the environment variables defined in .env.example to run Next.js AI Chatbot.

pnpm install
pnpm dev

Your app template should now be running on localhost:3000.

If you don't want to setup Upstash, you can run the Docker compose file to start a Redis DB with http server locally:

docker compose up

Then, adjust the environment variables in the .env file to point to the local Redis server.

KV_URL="http://localhost:8079"
KV_REST_API_URL="http://localhost:8079"
KV_REST_API_TOKEN="test"
KV_REST_API_READ_ONLY_TOKEN="test"

Connecting Databases

Dataviz Chatbot makes use of Turso SQLite DBs for querying data. Create a DB on Turso and pass in the URL and the authToken to the application.