Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rajeshdavidbabu/pdf-chat-ai
An AI powered Next.js app to chat with your PDF files and get a streamed response using Langchain and PineconeDB β¨π€π»ποΈ
https://github.com/rajeshdavidbabu/pdf-chat-ai
Last synced: 3 months ago
JSON representation
An AI powered Next.js app to chat with your PDF files and get a streamed response using Langchain and PineconeDB β¨π€π»ποΈ
- Host: GitHub
- URL: https://github.com/rajeshdavidbabu/pdf-chat-ai
- Owner: rajeshdavidbabu
- License: mit
- Created: 2023-08-14T10:56:54.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-11-30T13:21:14.000Z (12 months ago)
- Last Synced: 2024-07-11T04:34:39.018Z (4 months ago)
- Language: TypeScript
- Homepage:
- Size: 672 KB
- Stars: 172
- Watchers: 2
- Forks: 39
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PDF-CHAT AI β¨π€π»ποΈ
An AI-powered PDF chat built with Next.js 13, Langchain, and PineconeDB
## π·πΎββοΈ Want to Learn How to Build It?
Check out the tutorial on my YT [channel](https://www.youtube.com/watch?v=oiCFr19NtPo&t)## β¨Updateβ¨
Added sources to the stream and displaying it in an accordianhttps://github.com/rajeshdavidbabu/pdf-chat-ai/assets/15684795/feb5331d-b43d-4778-a8dd-630d6f361197
## Architecture
## π©βπ Description
Built with:
- β Next.js 13
- β Shadcn-ui
- β Langchain TypeScript integration
- β PineconeDB as the knowledge store
- β Dark Mode with persistent theme-switching## ποΈ Pre-requisites
- 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.## π¬ Good to know
- The PineconeDB index creation happens when we run `npm run prepare:data`, but its better to create it manually if you dont want the command to fail.
- If the command fails, then give sometime for pinecone index to get initialized and try to run the command again, it should work eventually.## π§ Commands
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` |## πΈ Roadmap
- β Add sources to the streamed chat bubble
- π§ Clean up and show proper error messages
- π§ Sanitize input and output source documents## ππ½ Contributing
Pull requests are welcome, before creating a PR talk to me on [discord](https://discord.com/channels/1121796870231040020/1156553471881908275). For major changes, please open an issue first
to discuss what you would like to change.