Git Product home page Git Product logo

chatgpt-vue-chat's Introduction

ChatGPT-VUE-Chat

Description

A simple chat interface with ChatGPT on the left and users on the right. When the 'Send' button is clicked, the prompt is sent to the backend API for processing.

You can choose who you talk to on the SideBar.

Here is example:

image

Features

Run

You'd better run server first.

Server

cd server
pip3 install -r requirements.txt
python3 app.py

Because there are not too much packages dependencies, maybe the python version is not a ploblem.(I use python3.11).

I use openai==0.27.0, because of the new chatgpt api. You'd better make sure the version of openai package. The package is new, so maybe you could not use 'mirror'. Just download it like this:

pip install -i https://pypi.python.org/simple/ openai==0.27.0

Client

Reference

https://github.com/taylorchen709/vue-chat

cd client
nvm install 18 # use node version 18 if possible
npm install
npm run serve

Noting:

  • At the beginning of this project, I did a combination of BingChatGPT backend and a Vue frontend.
  • Later, BingChatGPT did not open the API interface for use.
  • Then, I changed the back-end code to an API interface based on OPENAI GPT3 (because ChatGPT is not open anymore), but there is also a problem: too many people use this API, which may cause the connection to fail.(The code maybe redundant.You can modify the redundant code of server/app.py and src/components/ChatList.vue/sendMsg())
  • After openai public chatgpt api at 2023.03.02. I archive the origin code into branch v1.0. And write new code in branch main.
  • I change name of the repository from BingChatGPT-Vue-Chat into ChatGPT-Vue-Chat.
  • User can talk to different bots at same time

TODO:

  • I want to make more chat interfaces, users can choose who to talk to in the left sidebar, such as a beautiful girl, a handsome man or Elon Musk, etc.
  • The display fails when there are HTML tags in the content string of the chat record
  • Beautify the sidebar

If you have better suggestions, please issue.

chatgpt-vue-chat's People

Contributors

changqingaas avatar huwei901108 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.