Skip to content

Chat with PDFs using AI like ChatGPT that remembers previous interactions for personalized and seamless answers anytime, anywhere.

Notifications You must be signed in to change notification settings

indraantoor/Chat-PDF-AI

Repository files navigation


Chat To PDF

Chat with PDFs using AI like ChatGPT that remembers previous interactions for personalized answers.
Explore the docs »

demo.chat.to.pdf.mp4
preview
Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contact

About The Project

This project allows users to chat with PDFs using an AI similar to ChatGPT, providing personalized and context-aware responses. Unlike traditional PDF readers or AI assistants, this system remembers previous interactions, ensuring a seamless, intelligent, and engaging conversation over multiple queries.

Users can upload PDFs, ask questions, and receive relevant, concise, and accurate answers without needing to rephrase or provide context repeatedly. The AI continuously learns from previous exchanges within a session, making responses more tailored and intuitive.

Built with a focus on usability, efficiency, and scalability, this project is ideal for students, researchers, professionals, and anyone who frequently works with documents. Whether you need quick insights, summaries, explanations, or specific details, this AI-powered tool enhances your workflow and productivity.

(back to top)

Built With

  • Next js
  • React js
  • Open AI
  • Pinecone DB
  • LangChain
  • Firebase
  • Clerk
  • ShadCn
  • Stripe
  • Typescript
  • Tailwind CSS
  • Daisy UI

(back to top)

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • Node

  • npm

    npm install npm@latest -g

Installation

  1. Get a Open AI API Key at https://platform.openai.com/api-keys

  2. Get Pinecone API KEY, Firebase API Key, Firebase Service Key, Firebase Storage Bucket name, Clerk Publishable Key, Clerk Secret Key and Stripe's Publishable Key, Stripe Secret Key, Stripe Webhook Secret.

  3. Clone the repo

    git clone https://github.com/indraantoor/Chat-PDF-AI
  4. Install NPM packages In All Of These Cloned Directories

    npm install
  5. In your environment variable file paste those values with the following names

    NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=<value_here>
    CLERK_SECRET_KEY=<value_here>
    NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=<value_here>
    STRIPE_API_KEY=<value_here>
    STRIPE_WEBHOOK_SECRET=<value_here>
    PINECONE_API_KEY=<value_here>
    OPENAI_API_KEY=<value_here>
    FIREBASE_API_KEY=<value_here>
    FIREBASE_SERVICE_KEY=<value_here>
    FIREBASE_STORAGE_BUCKET=<value_here>
  1. Run the application

    Navigate To The Directory and run
    
    npm run dev
    (to run app in development mode)
    
    npm start
    (to run app in production mode after building using npm run build)

(back to top)

Usage

Login or sign up to access the application.

Screenshot 2025-02-02 at 9 37 14 PM Screenshot 2025-02-02 at 9 37 34 PM

Once on your dashboard page click on "Add a document".

Screenshot 2025-02-02 at 9 38 38 PM

Drag and drop your contract file and make sure it is in "pdf" format.

Screenshot 2025-02-02 at 9 39 21 PM

Wait for the processing to get completed, you will get live updates of the step the processing is currently on.

Screenshot 2025-02-02 at 9 39 42 PM

You can now Chat With the PDF using the chatbot on the right section.

Screenshot 2025-02-02 at 9 41 03 PM preview

You can also delete uploaded PDF files and download them.

Screenshot 2025-02-02 at 9 42 29 PM

Plan Restrictions

There are 2 plans Free and PRO.

FREE PLAN

In Free plan you can only upload a limited number of documents and the number of messages per document is also limited (2) and you can also not delete documents Screenshot 2025-02-02 at 9 48 42 PM

PRO PLAN

In the PRO plan you can upload documents and delete documents and the chat messages limit is 20 per document.

UPGRADE

It is implemented using STRIPE. To upgrade from FREE to PRO you can go to the pricing page and upgrade. Screenshot 2025-02-02 at 9 49 04 PM

Screenshot 2025-02-02 at 9 50 06 PM

(back to top)

Contact

Project Link: https://github.com/indraantoor/Chat-PDF-AI

(back to top)

About

Chat with PDFs using AI like ChatGPT that remembers previous interactions for personalized and seamless answers anytime, anywhere.

Resources

Stars

Watchers

Forks