{"id":13457301,"url":"https://github.com/dissorial/doc-chatbot","last_synced_at":"2025-04-04T06:07:19.497Z","repository":{"id":162551478,"uuid":"636948351","full_name":"dissorial/doc-chatbot","owner":"dissorial","description":"Document chatbot — multiple files, topics, chat windows and chat history. Powered by GPT.","archived":false,"fork":false,"pushed_at":"2023-07-21T10:08:10.000Z","size":2660,"stargazers_count":845,"open_issues_count":13,"forks_count":144,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-28T05:11:10.857Z","etag":null,"topics":["chat","chatbot","document-embedding","gpt-3","gpt-4","langchain","mongoose","nextjs","openai","openai-api","pdf-processing","pinecone","reactjs","tailwindcss","typescript","vectorization"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dissorial.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-06T03:50:21.000Z","updated_at":"2025-03-27T20:31:37.000Z","dependencies_parsed_at":"2024-12-22T15:25:12.775Z","dependency_job_id":"cd67aa48-fcdd-476e-888d-0115cd7ec43e","html_url":"https://github.com/dissorial/doc-chatbot","commit_stats":{"total_commits":67,"total_committers":1,"mean_commits":67.0,"dds":0.0,"last_synced_commit":"c8751b26bf42ca4b244cae3f51c703014385f3fa"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dissorial%2Fdoc-chatbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dissorial%2Fdoc-chatbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dissorial%2Fdoc-chatbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dissorial%2Fdoc-chatbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dissorial","download_url":"https://codeload.github.com/dissorial/doc-chatbot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247128747,"owners_count":20888235,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chat","chatbot","document-embedding","gpt-3","gpt-4","langchain","mongoose","nextjs","openai","openai-api","pdf-processing","pinecone","reactjs","tailwindcss","typescript","vectorization"],"created_at":"2024-07-31T08:01:39.064Z","updated_at":"2025-04-04T06:07:19.473Z","avatar_url":"https://github.com/dissorial.png","language":"TypeScript","readme":"# doc-chatbot: GPT x Pinecone x LangChain\n\n## Features\n\n- Create **multiple** topics to chat about\n- Store **any number of files** to each topic\n- Create **any number of chats** (chat windows) for each topic\n- Upload files, convert them to embeddings, store the embeddings in a namespace and upload to Pinecone, and delete Pinecone namespaces **from within the browser**\n- Store and automatically **retrieve chat history** for all chats with local storage\n- Supports `.pdf`, `.docx` and `.txt`\n\n![TypeScript](https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge\u0026logo=typescript\u0026logoColor=white)\n![Next JS](https://img.shields.io/badge/Next-black?style=for-the-badge\u0026logo=next.js\u0026logoColor=white)\n![React](https://img.shields.io/badge/react-%2320232a.svg?style=for-the-badge\u0026logo=react\u0026logoColor=%2361DAFB)\n![TailwindCSS](https://img.shields.io/badge/tailwindcss-%2338B2AC.svg?style=for-the-badge\u0026logo=tailwind-css\u0026logoColor=white)\n\n`+ LangChain and Pinecone`\n\nNote: If you'd like to set this up with google auth and mongoDB (as opposed to no auth and using local storage), have a look at this branch: [mongodb-and-auth](https://github.com/dissorial/doc-chatbot/tree/mongodb-and-auth). However, that repo is several important commits behind this one and lacks certain features, so keep that in mind.\n\n**Main chat area**\n![Main chat area](public/images/main.png)\n\n---\n\n**Settings page**\n\n![Settings page](public/images/settings.png)\n\n---\n\n## Local setup \u0026 development\n\nIf you'd like to run this locally and deploy your own version, follow the steps below.\n\n### Clone the repo\n\n```\ngit clone https://github.com/dissorial/doc-chatbot.git\n```\n\n---\n\n### Pinecone setup\n\n#### API key\n\nCreate an account on Pinecone. Go to `Indexes` and `Create index`. Enter any name, put `1536` for `Dimensions` and leave the rest on default. Then go to `API keys` and `Create API key`.\n\n#### Index name\n\nSelf-explanatory\n\n#### Pinecone environment\n\nRight next to your index name, e.g. `us-west2-rkw`\n\n---\n\n### Install packages\n\n```\nyarn install\n```\n\n---\n\n### Set up your `.env` file\n\n- Rename `.env.example` to `.env`\n- Your `.env` file should look like this:\n\n```\nNODE_ENV=development\n```\n\n### Node environment\n\n- Development by default. In production, set this to 'production' (without the quotes)\n\n### Other\n\n- In `utils/makechain.ts`, adjust the `QA_PROMPT` for your own usecase. Change `modelName` in `new OpenAI` to `gpt-4`, if you have access to it.\n\n---\n\n## Deployment\n\nAdd these to your `.env` file:\n\n```\nNEXTAUTH_URL=http://localhost:3000\nNEXTAUTH_SECRET=\nJWT_SECRET=\n```\n\n### NextAuth Secret\n\n- You can generate this by running `openssl rand -base64 32` in Git Bash.\n\n### JWT Secret\n\n- You can generate this by running `openssl rand -base64 32` in Git Bash.\n\n### NextAuth URL\n\n- Default is http://localhost:3000. In production, this should be the URL of your deployed app.\n\n---\n\n## Run the app\n\n```\nnpm run dev\n```\n\n---\n\n## Troubleshooting\n\n### General errors\n\n- Make sure that you are running the latest version of Node. To check your version run node -v.\n- If you're encountering issues with a specific file, try converting it to text first or try a different file. It's possible that the file is corrupted, scanned, or requires OCR to be converted to text.\n- Confirm that you're using the same versions of LangChain and Pinecone as this repository.\n\n### Pinecone errors\n\n- Confirm that you've set the vector dimensions to 1536.\n- Note that Pinecone indexes for users on the Starter (free) plan are deleted after 7 days of inactivity. To prevent this, send an API request to Pinecone to reset the counter before 7 days.\n- If issues persist, consider starting fresh with a new Pinecone project, index, and cloned repository.\n\n---\n\n## Credit\n\nThis repository was originally a fork of [GPT-4 \u0026 LangChain](https://github.com/mayooear/gpt4-pdf-chatbot-langchain) repository by [mayooear](https://github.com/mayooear/gpt4-pdf-chatbot-langchain) but underwent many major changes in this repo.\n\n_Frontend of this repo is inspired by ChatGPT._\n","funding_links":[],"categories":["Meta","TypeScript","chatbot"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdissorial%2Fdoc-chatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdissorial%2Fdoc-chatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdissorial%2Fdoc-chatbot/lists"}