This is the repo for my PDF ChatBot application, an extension of my ArXiv ChatBot Application. This application extends on the ArXiv ChatBot by allowing users to upload their own PDF files to chat with. This functionality is facilitated using Amazon S3 buckets.
To be able to upload local PDFs, users must first sign in and have their account approved. At a base-level this was just to keep usage at a reasonable level and protect my Amazon credits, but it also allowed me to play around with various authentication methods for Next.js applications.
However, I've included functionality to chat with pre-existing sample PDFs for users who just want to test out the functionality of the app without signing in.
This application is powered by Next.js and therefore uses React on the frontend. On the backend, LangChain JS, Next.js API routes and Amazon S3 buckets are used to handle document loading and question answering over a document. To handle user authentication, NextAuth.js is used with a MongoDB database.
- Fork this repo
- Start editing the page by modifying
src/pages/index.js
To learn more about Next.js, here are some helpful links:
- Next.js Documentation
- Next.js Foundations Course (provided by Next.js)
To learn more about LangChain JS, here are some helpful links:
Thank you to Zahid Khawaja (GitHub), whose langchain-chat-nextjs repo was the initial inspiration for this project.
Also, thank you to James Briggs (Youtube, GitHub), whose LangChain videos sparked my interest in these topics and led me down this path of discovery.
Finally, thank you to Harrison Chase (GitHub) for creating LangChain and the incredible community around it. Both creations make building with LLMs incredibly simple and enjoyable!