Coder Social home page Coder Social logo

chatgpt-api-server-deploy's Introduction

ChatGPT-API-Server-Deploy

ChatGPT API Server 快速部署脚本库

本服务为商业服务,自2024年4月16日0:00不再提供免费接入点。需付费使用。

重要提示 20231224 更新

  • 本次更新启用了redis缓存, 历史安装的用户可能REDIS配置是注释状态,请自行修改取消注释,具体请对照当前库中的docker-compose.yml文件
  • 因api-server主程序已集成chat2api接口,原有chat2api可删除,但是需要修改docker-compose.yml文件中的command参数,具体请对照当前库中的docker-compose.yml文件

修改完毕后依次执行以下命令完成更新

docker-compose down

./deploy.sh

前置条件

  • 一台至少 2 核 2G 内存的服务器,推荐使用香港、新加坡、日本地区的服务器,可以兼顾国内访问。
  • 安装了 docker 和 docker-compose
  • 安装了 git
  • 有官网直登账号(不支持谷歌、微软、苹果等第三方登陆账号)

安装视频教程

https://www.bilibili.com/video/BV1Mo4y177Lp

自动部署

在服务器上执行以下命令即可

curl -sSfL https://raw.githubusercontent.com/xyhelper/chatgpt-api-server-deploy/master/quick-install.sh | bash

手动部署

  1. 克隆本仓库到服务器上
git clone --depth=1 https://github.com/xyhelper/chatgpt-api-server-deploy.git chatgpt-api
  1. 进入目录
cd chatgpt-api
  1. 启动服务
./deploy.sh

使用方法

用户端访问地址为 http://服务器 ip:8101

管理后台地址为 http://服务器 ip:8100/xyhelper/

默认用户名密码为 admin/123456

模拟API接口地址

http://服务器IP:8100/v1/chat/completions

加入交流群

微信

chatgpt-api-server-deploy's People

Contributors

gcslaoli avatar hanwencc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

chatgpt-api-server-deploy's Issues

模拟API接口地址 后面具体的请求体应该是怎么样的 ,求给个curl 示范

模拟API接口地址 后面具体的请求体应该是怎么样的 ,求给个curl 示范

curl --location --request POST 'http://服务器IP:8100/v1/chat/completions/v1/chat/completions'
--header 'Content-Type: application/json'
--header 'Authorization: Bearer sk-chenai-xxx'
--header 'userToken: c6b0d865-34e5-414d-b4-xxx'
--data '{
"userToken": "c6b0d865-34e5-414d-b4-xxx",
"model": "gpt-4",
"messages": [{"role": "user", "content": "12+12” }],
"prompt" : "12+12",
"stream”:true
}'

目前我是这样的 ,提示 {"detail":"userToken not found"}% 错误

使用一键部署脚本mysql报错

/go/pkg/mod/github.com/cool-team-official/cool-admin-go/contrib/drivers/[email protected]/mysql.go:51
[error] failed to initialize database, got error Error 1045 (28000): Access denied for user 'root'@'172.18.0.5' (using password: YES)
panic: Error 1045 (28000): Access denied for user 'root'@'172.18.0.5' (using password: YES) [recovered]
panic: failed to connect database

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.