• Stars
    star
    173
  • Rank 219,471 (Top 5 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created about 1 year ago
  • Updated 11 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
116
star
2

remix-shadcn-starter

A Remix + Shadcn-ui with optimistic dark-mode
TypeScript
52
star
3

remix-craftjs-starter

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

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
47
star
5

remix-mdx-blog

A simple blog built with remix and mdx
TypeScript
46
star
6

infinite-scroll-server-actions

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

remix-supabase-social

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

react-for-heroku

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

supabase-drizzle-express

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

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
11

federation-demo-local-services

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

Node-Clone-S3-Bucket

Clones S3 Bucket or any of its directory recursively and locally.
JavaScript
8
star
13

react-i18n-codesplitting-locales

A simple react-18n to code-split locale files using dynamic imports.
TypeScript
6
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

personal-portfolio

A personal portfolio built with Remix
MDX
4
star
17

virtualized-list-demo

A simple virtualized list demo
TypeScript
4
star
18

Javascript-Event-Calender

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

next-magic-ui-starter

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

rsc-forms

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

ai-cal-chat-docs

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

chatomate-docs

A documentation website for chatomate app
TypeScript
1
star
23

react-ts-boilerplate

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

nest-pokemon-api

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

social-chat-graphql-client

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

react-redux-simple-menu

JavaScript
1
star