Giter Site home page Giter Site logo

creazygao / chatgpt-web-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mic1on/chatgpt-web

0.0 0.0 0.0 114 KB

chatGPT私有化部署

Home Page: https://52caiji.com/posts/other/opensource/chatgpt-web.html

Shell 0.35% Python 28.78% TypeScript 14.53% CSS 4.44% HTML 2.23% Vue 47.12% Dockerfile 2.55%

chatgpt-web-1's Introduction

ChatGPT-WEB

注意:图中的余额指的是chatgptAPI_KEY的余额。

本项目为chatgpt私有化部署,基于fastapi vue3 chatgpt api实现。

更新日志:

03-02: 支持gpt-3.5-turbo模型

02-20:支持了API的连续对话

02-15:前端可以自定义API_KEY,优先级大于后端自定义的API_KEY

快速开始

1. docker 部署

作者已经将chatgpt打包成镜像,可以直接使用docker部署。

docker run --name chatgpt -d -p 8000:8000 -e API_KEY=xxxxxx miclon/chatgpt:latest

2. 本地部署

  • 拉取项目,安装依赖
cd web
pnpm install
pnpm run build
cp -r web/dist api/dist
cd api
pip install -r requirements.txt
  • 启动项目
# 启动前端
cd web
pnpm run dev
# 启动后端
cd api
python app.py

如果你不想动手

笔者自建了微信公众号:代码领悟,您关注后即可直接与AI对话。

公众号搭建chatGPT搭建流程图:

答疑

  • 为什么需要API_KEY

API_KEYchatgpt的API密钥,通过API_KEY方可调用官方接口,您可以在chatgpt官网申请。API_KEY通常是sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx这种形式。

  • 我想修改项目中版权信息,如何修改?

如果你不懂前端,你可以直接fork项目,替换前端字符串然后提交自己仓库,然后会自动docker构建。但是有个前提,你需要在github actions中配置DOCKER_USERNAMEDOCKER_PASSWORD,这两个变量是你的docker账号和密码。

  • 为什么要内置后端?

前端其实可以直接通过axios请求chatgpt官方接口,但是为了数据安全,如果前端调用那就会暴露自己的API_KEY,所以笔者将前端和后端分离,前端只负责展示,后端负责调用chatgpt官方接口。

chatgpt-web-1's People

Contributors

coconutwwater avatar creazygao avatar mic1on avatar xyb 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.