GithubHelp home page GithubHelp logo

yinkiu602 / chatgpt-web Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 545 KB

A ChatGPT clone written in React.js & Express.js

Home Page: https://chatgpt-clone-cloudflare-page.pages.dev/

License: GNU General Public License v3.0

JavaScript 79.56% HTML 5.31% CSS 15.13%
chagpt expressjs openai reactjs upstash-ratelimit

chatgpt-web's Introduction

ChatGPT clone using React (Frontend) and Express.js (Backend)

A cloned version of ChatGPT website written in JavaScript. Using OpenAI API to interact with OpenAI model.

Screenshots

alt text

Serverless eployment

Requirements

Features

  • Authentication via Discord OAuth2
  • Display mathematical notation from GPT response with LaTeX markup
  • Highlight code segment from GPT response and enclose in code block
  • Interact with OpenAI GPT model using API
  • Remember login by session cookies
  • Remove image in prompt by clicking on corresponding image
  • Save & Load chat history from database
  • Upload image in prompt by Ctrl+V to utilize GPT-4 vision capabilities

TODOs

  • Button for deleting chat history
  • Button for removing uploaded image in prompt
  • Button for uploading image instead of Ctrl+V only
  • Better UI design
  • Logout button
  • Responsive Web Design (Especially for mobile users)

General installation

git clone https://github.com/yinkiu602/Chatgpt-web.git

Installation (Frontend)

cd frontend
npm install
npm start

Installation (Backend)

cd server
npm install
node App.js

Chat saving

  • All chat history will be automatically saved to database if the user is logged in.

Datbase entry format

{
    "_id": "${random_chat_id_here}",
    "userId": "${user_id}",
    "title": "${title of the conversation}",
    "messages": [
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "${user prompt}"
                }
            ]
        },
        {
            "role": "assistant",
            "content": "${response from GPT}"
        }
    ],
    "modified": ${Unix timestamp of last modification}
}

Authors

License

chatgpt-web's People

Contributors

yinkiu602 avatar

Watchers

 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.