Skip to content

pirouzmehmandoost/chatbot_app

Repository files navigation

This is a Next.js project bootstrapped with create-next-app. It is a function AI assistant with a barebones UI. Please read the TO-DO list below to review limitations!

Deployed with Vercel

Visit: https://ama-app-nu.vercel.app/

Running locally

To run locally the development server, you must provide your own OpenAI API key in a .env file. Add your key to .env as OPENAI_API_KEY="..."

npm run dev

Open http://localhost:3000 with your browser to see the result.

Tools Used

  • Frameworks

  • AI

    • Vercel AI SDK - Extensive toolkit for supporting various AI SDK Providers.
    • OpenAI - Provider, language model support for OpenAI API's (completion, responses, chat, embeddings).
      • Model is set in the chat API route (api/chat/route.js).
  • Styling

  • Database/object storage

Notes:

State of the app within 72 hours of creation

  • General chatbot functionality implemented.
  • General UX/styling implemented.
  • Simple tool calls enabled - a simple, first-round implementation for simple tool calling is enabled, not too useful at the moment (fetches weather data, performs math conversions and formats output).
  • Enabled multi-step tool calls.
  • Set up Postgres database, Neon + pgvector extensions, set up a Vercel Blob store for raw object storage, installed necessary packages.

To-dos:

implement data pipelines for:

1: User file management - uploading:

  • pipeline trigger: user uploads a file -> client-side data validation -> server-side data validation -> metadata generation -> db lookup -> db transaction -> blob storage -> response generation -> response processing -> app state update.

2: New file data ingestion:

  • pipeline trigger: user selects file, taps button to trigger ingestion -> db/blob store validation (db metadata entry lookup + blob store lookup )
    -> blob store fetch -> file processing (server-side data validation -> nlp -> tool calls (not in 1st proto) -> chunking -> embedding generation -> metadata generation -> db transation -> response generation -> response processing -> app state update.

Postgres business logic

Blob Store interaction logic

file upload UI/UX

Releases

No releases published

Packages

 
 
 

Contributors