• Stars
    star
    177
  • Rank 215,985 (Top 5 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 1 year ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An AI powered Next.js app to chat with your PDF files and get a streamed response using Langchain and PineconeDB βœ¨πŸ€–πŸ’»πŸ—ƒοΈ

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

✨Update✨

Added sources to the stream and displaying it in an accordian

Chat.with.sources.mov

Architecture

Embed LLM

πŸ‘©β€πŸš€ 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. For major changes, please open an issue first to discuss what you would like to change.

More Repositories

1

pdf-chat-ai-sdk

An AI powered Next.js app to chat with your PDF files and get a streamed response using Vercel's AI SDK, Langchain and PineconeDB βœ¨πŸ€–πŸ’»πŸ—ƒοΈ
TypeScript
133
star
2

s3-upload-thing

A simple Next.js + Uppy file-uploader built using S3 AWS SDK
TypeScript
82
star
3

remix-craftjs-starter

A starter website-builder app using Remix + Craft.js using Shadcn-ui app
TypeScript
73
star
4

remix-shadcn-starter

A Remix + Shadcn-ui with optimistic dark-mode
TypeScript
56
star
5

shadcn-ui-lib-starter

A simple starter kit to build your own shadcn-ui library using components from https://ui.shadcn.com/docs/components
TypeScript
55
star
6

remix-mdx-blog

A simple blog built with remix and mdx
TypeScript
53
star
7

remix-supabase-social

A community driven social networking app built using Remix and Supabase
TypeScript
40
star
8

infinite-scroll-server-actions

A simple infinite scroll implemented using Next.13 server actions and shadcn-ui
TypeScript
36
star
9

react-for-heroku

A simple deployment ready react - webpack 4 boilerplate for heroku
JavaScript
17
star
10

supabase-drizzle-express

A simple drizzle, supabase and an express starter
TypeScript
12
star
11

html-chat-ai-sdk

An AI-powered HTML chat built with Next.js 13, Vercel's AI SDK, Langchain, Unstructured and PineconeDB βœ¨πŸ€–πŸ’»πŸ—ƒοΈ
TypeScript
9
star
12

federation-demo-local-services

An extension of Apollo Federation Demo using local services instead of running micro-services
JavaScript
8
star
13

Node-Clone-S3-Bucket

Clones S3 Bucket or any of its directory recursively and locally.
JavaScript
7
star
14

remix-shadcn-dark-mode

Different implementations of Remix Dark-mode toggle with Shadcn-ui
TypeScript
6
star
15

next-auth-google-oauth

Next auth google oauth with calendar access
TypeScript
6
star
16

react-i18n-codesplitting-locales

A simple react-18n to code-split locale files using dynamic imports.
TypeScript
5
star
17

virtualized-list-demo

A simple virtualized list demo
TypeScript
5
star
18

next-magic-ui-starter

A simple starter with next.js + magic-ui Components with dark-mode toggle
TypeScript
4
star
19

personal-portfolio

A personal portfolio built with Remix
MDX
4
star
20

Javascript-Event-Calender

A javascript event calendar to detect both collisions and overlapping.
JavaScript
4
star
21

rsc-forms

A simple react-server component forms build using shadcn-ui
TypeScript
2
star
22

ai-cal-chat-docs

Docs for ai-cal-chat setup and running
TypeScript
1
star
23

chatomate-docs

A documentation website for chatomate app
TypeScript
1
star
24

react-ts-boilerplate

A React-TS application created without the help of CRA(Create React App)
TypeScript
1
star
25

nest-pokemon-api

A Nest.js application to retrieve pokemon information.
TypeScript
1
star
26

social-chat-graphql-client

A react based graphql client for the social-chat-graphql server
JavaScript
1
star
27

react-redux-simple-menu

JavaScript
1
star
28

clip-image-search-next

A Nextjs based CLIP text-to-image search using Pinecone, PyTorch and Fast API
TypeScript
1
star