Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

michaelcreatesstuff/big-agi-in-memory-pdf-upload-poc

 
 

Repository files navigation

PDF Upload Proof of Concept Using Langchain JS and Pinecone Vector Storage

Drag and Drop PDF Files into the browser

This project allows the user to

  1. Drag and drop PDF files into the browser
  2. Create embeddings of the PDF files and upload them to Pinecone
  3. Chat with the documents and extract useful information

It is meant to help developers who are familiar with Javascript/Typescript better leverage more advanced tooling and can serve as a bare-bones template or provide some useful code snippets to be reused.

Create a .env file based off of .env.example.

You will need OPENAI_API_KEY, PINECONE_API_KEY, PINECONE_ENVIRONMENT, and PINECONE_INDEX_NAME

npm install

npm run dev

Go to localhost:3000/files

Drag and drop a PDF file (or multiple PDF files) and click Upload

dragdrop.mov

Wait for the upload to finish.

Ask a question about the documents you just uploaded. This chat with the documents does not seem to cost anything.

chat

BIG-AGI 🤖💬

Welcome to big-AGI, FKA nextjs-chatgpt-app. 👋🎉 Personal AGI App, powered by OpenAI GPT-4 and beyond. Designed for smart humans and super-heroes, this responsive web app comes with Personas, Drawing, Code Execution, PDF imports, Voice support, data Rendering, AGI functions, chats and more. Show your friends some #big-AGI-energy 🚀

Official Website

Or fork & run on Vercel

Deploy with Vercel

Useful 👊

Ask away, paste a ton, copy the gems

  • Engaging AI Personas
  • Clean UX, w/ tokens counters
  • Privacy: user-owned API keys and localStorage
  • Human I/O: Advanced voice support (TTS, STT)
  • Machine I/O: PDF import & Summarization, code execution
  • Many more updates & integrations: ElevenLabs, Helicone, Paste.gg, Prodia
  • Coming up: automatic-AGI reasoning

Support 🙌

Official Discord


Latest Drops 🚀

🚨 April: more #big-agi-energy

March: first release

  • 🎉 AI Personas - including Code, Science, Corporate, and Chat 🎭
  • 🎉 Privacy: user-owned API keys 🔑 and localStorage 🛡️
  • 🎉 Context - Attach or Drag & Drop files to add them to the prompt 📁
  • 🎉 Syntax highlighting - for multiple languages 🌈
  • 🎉 Code Execution: Sandpack - now on branch variant-code-execution
  • 🎉 Chat with GPT-4 and 3.5 Turbo 🧠💨
  • 🎉 Real-time streaming of AI responses ⚡
  • 🎉 Voice Input 🎙️ - works great on Chrome / Windows
  • 🎉 Integration: Paste.gg integration for chat sharing 📥
  • 🎉 Integration: Helicone integration for API observability 📊
  • 🌙 Dark model - Wide mode ⛶

Why this? 💡

Because the official Chat lacks important features, is more limited than the api, at times slow or unavailable, and you cannot deploy it yourself, remix it, add features, or share it with your friends. Our users report that big-AGI is faster, more reliable, and features rich with features that matter to them.

Much features, so fun

Docker 🐳

Pre-built image

Add your OpenAI API key to the .env file, then in a terminal run:

docker-compose up

Locally built image

If you wish to build the image yourself, run

docker build -t big-agi .
docker run --detach 'big-agi'

Code 🧩

TypeScript React Next.js

Clone this repo, install the dependencies, and run the development server:

git clone https://github.com/enricoros/big-agi.git
cd big-agi
npm install
npm run dev

Now the app should be running on http://localhost:3000

Integrations:

  • ElevenLabs Voice Synthesis (bring your own voice too) - Settings > Text To Speech
  • Helicone LLM Observability Platform - Settings > Advanced > API Host: 'oai.hconeai.com'
  • Paste.gg Paste Sharing - Chat Menu > Share via paste.gg
  • Prodia Image Generation - Settings > Image Generation > Api Key & Model

This project is licensed under the MIT License.

GitHub stars GitHub forks GitHub pull requests License

Made with 💙

About

PDF Upload Proof-of-Concept using Langchain

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 92.7%
  • CSS 6.8%
  • Other 0.5%