This project allows users to upload a PDF file, generate a summary using AI, and interact with the AI to ask questions about the PDF content.
- Upload PDF files to Cloudflare R2
- Generate summaries using Workers AI
- Create vector embeddings and store them in Vectorize
- Chat with AI to ask questions about the PDF content
- Clone the repository:
git clone https://github.com/ygit/chat-with-pdf
cd chat-with-pdf
- Install dependencies:
npm install
-
Create an R2 bucket and update the binding in the
wrangler.toml
file. Follow the documentation to learn how to create a new bucket. -
Create a Vectorize database and update the bindings in the
wrangler.toml
file. Follow the documentation to learn how to do this.
To start the development server, run:
npm run dev
Navigate to localhost:8787
to view the app.
To deploy the project, use
npm run deploy
Contributions are welcome. Please open an issue to report any bugs.