Coder Social home page Coder Social logo

mosterwei13 / chatdocs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cthiriet/chatdocs

0.0 0.0 0.0 737 KB

Q&A for your online documentation.

Home Page: https://chatdocs-eight.vercel.app

Shell 2.70% JavaScript 45.96% Python 19.97% CSS 0.27% Jupyter Notebook 31.10%

chatdocs's Introduction

ChatDocs

Image description

ChatDocs is an open-source project that enables you to ask questions about your online documentation and receive real-time answers.

How it works:

  1. Index your documentation πŸ“
  2. Deploy the web application πŸš€
  3. Ask questions πŸ€”

Stripe Atlas Showcase

Prerequisites πŸ“‹

This project uses:

  • OpenAI for generating answers.
  • Pinecone for indexing the documentation.
  • Vercel for hosting the web application.

Be sure to have an account and your credentials for each of these services.

Ensure you have Node.js and Python 3 installed on your machine.

Architecture πŸ›οΈ

The project is composed of the following components:

  • webapp: folder containing the frontend code for the Q&A website.
  • crawl.py: Python script to crawl a website and index its content in Pinecone.

Getting Started πŸš€

To get started with ChatDocs, follow these instructions:

Clone the repository

git clone https://github.com/ClemDev2000/chatdocs

Install dependencies and setup the project

It will create a Python virtual environment and install the dependencies.

It will also ask your for your OpenAI and Pinecone credentials.

sh setup.sh

Customize the project

Edit webapp/public/logo.svg with the logo of your service.

Index your documentation

  • domain is your top-level domain (e.g. stripe.com).
  • url is the root URL of the page you want to index (e.g. https://stripe.com/docs/atlas/). In that case, the script will crawl all the pages with the following wildcard: https://stripe.com/docs/atlas/*.
  • excludes (optional) is a list of URLs you want to exclude from the index. It can be useful if you want to exclude the homepage or the pricing page.
# Activate the Python virtual environment
source venv/bin/activate

# Index the documentation
python3 crawl.py \
  --domain stripe.com \
  --url https://stripe.com/docs/atlas \
  --excludes https://stripe.com/docs/api,https://stripe.com/docs/js,https://stripe.com/docs/cli

Running the project locally

Open a terminal and run:

cd webapp
npm run dev

Go to http://localhost:3000 to see the website.

Deploy the web application on Vercel

  • Go to your dashboard and create a new project.
  • Select Next.js as the framework preset.
  • Select webapp as the root directory.
  • Copy the content of webapp/.env.local into the Environment Variables section.
  • Click on Deploy and wait for the deployment to finish.

Vercel deployment Environment variables

Contributing πŸ§‘β€πŸ’»

We welcome contributions to ChatDocs! To get started, follow these steps:

  • Fork the repository.
  • Create a new branch for your changes.
  • Make your changes and commit them to your branch.
  • Push your changes to your fork.
  • Submit a pull request with a detailed description of your changes.

Contact πŸ€™

If you have any questions or comments about ChatDocs or if you want some help to deploy it for your project, please contact us at [email protected].

We hope you find ChatDocs useful and enjoy using it!

Creator πŸ§‘πŸΌβ€πŸŽ¨

Created by ClΓ©ment Thiriet. A DreamCin product.

chatdocs's People

Contributors

cthiriet avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.