chatGPT-service和chatGPT-stream
# 拉取代码
git clone https://github.com/cookeem/chatgpt-stream.git
cd chatgpt-stream
# chatGPT的注册页面: https://beta.openai.com/signup
# chatGPT的注册教程: https://www.cnblogs.com/damugua/p/16969508.html
# chatGPT的APIkey管理界面: https://beta.openai.com/account/api-keys
# 修改config.yaml配置文件,修改appKey,改为你的openai.com的appKey
vi config.yaml
# openai的appKey,改为你的apiKey
appKey: "xxxxxx"
# 使用docker启动服务
docker-compose ps
Name Command State Ports
-----------------------------------------------------------------------------------------------
chatgpt-service /chatgpt-service/chatgpt-s ... Up 0.0.0.0:59142->9000/tcp
chatgpt-stream /docker-entrypoint.sh ngin ... Up 0.0.0.0:3000->80/tcp,:::3000->80/tcp
# 访问页面,请保证你的服务器可以访问chatGPT的api接口
# http://localhost:3000
# 注意本项目需要先运行chatgpt-service后端服务
# .env.development为运行测试的配置文件
# .env.production为正式构建的配置文件
# 拉取构建依赖
npm install
# 运行测试
npm run serve
# 执行编译
npm run build