An AI-powered PDF chat built with Next.js 13, Langchain, and PineconeDB
Subscribe to my YouTube Channel for an upcoming video tutorial!
Demo.mp4
![Screenshot 2023-08-14 at 12 11 05](https://private-user-images.githubusercontent.com/15684795/260449746-a2142d39-ec97-410f-89dc-907e25524fad.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg5MjU1NzYsIm5iZiI6MTcxODkyNTI3NiwicGF0aCI6Ii8xNTY4NDc5NS8yNjA0NDk3NDYtYTIxNDJkMzktZWM5Ny00MTBmLTg5ZGMtOTA3ZTI1NTI0ZmFkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIwVDIzMTQzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU4YTdlMThjOThhNzRkMmJiOTY3NDdhZDczYzA4MDA5NjcwYjJiYjNkZDM5NTJjYTgxNjBjNTMwYmM5YWZjZGQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.o7j40SoTgrahTu9n5hjNX06JzyiECcj9U-cznuu3FAg)
Built with:
- β Next.js 13
- β Shadcn-ui
- β Langchain TypeScript integration
- β PineconeDB as the knowledge store
- β Dark Mode with persistent theme-switching
- Create a free account and get an OPEN_AI key from platform.openai.com
- Create a free account and get access to PineconeDB
- And populate your
.env
file with the required information.
All commands are run from the root of the project, from a terminal:
Command | Action |
---|---|
npm install |
Installs dependencies |
npm run prepare:data |
Splits your PDF file under the /docs folder into chunks, embeds them, uploads them to Pinecone |
npm run dev |
Starts the local dev server at localhost:3000 |
- Add sources to the streamed chat bubble
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.