代码地址:
- 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
复制代码
上传至服务器 执行
宝塔设置

附上一个反代地址:api.aizhineng.cc
|