自建web chatgpt反代教程
代码地址:
https://github.com/acheong08/ChatGPT-Proxy-V1
创建文件:internal\handlers\config.json
内容为:
{
"Endpoint": "https://api.openai.com"
}
internal\handlers\server.go 36行修改为:
url := Config.Endpoint + c.Param("path")
编译:
set GOOS=linux
set GOPACH=amd64
go build
上传至服务器
执行
chomod 777 文件名
./文件
宝塔设置
附上一个反代地址:api.aizhineng.cc
打赏