自己去fork到自己的仓库,自己去main.go更改端口为serv00允许的端口
安装go环境(serv00有go环境,但是版本不行)
wget https://go.dev/dl/go1.21.9.freebsd-amd64.tar.gz
tar -xzf go1.21.9.freebsd-amd64.tar.gz
rm go1.21.9.freebsd-amd64.tar.gz
go添加到PATH
步骤 1: 编辑你的 shell 配置文件
nano ~/.bashrc
在文件的末尾,添加以下行:
export PATH="$HOME/language/go/bin:$PATH"
按下 Ctrl + O 保存文件,然后回车,然后按 Ctrl + X 退出 nano。
步骤 3: 应用更改
重新加载 .bashrc 文件:
source ~/.bashrc
步骤 4: 验证更改
go version
之后
git clone https://github.com/aurora-develop/aurora.git
cd aurora
go mod tidy
go build -o aurora .
./aurora
curl --location 'http://127.0.0.1:4545/v1/chat/completions' --header 'Content-Type: application/json' --data '{"model": "gpt-3.5-turbo", "messages": [{"role": "user", "content": "Say this is a test!"}]}'
不知道为什么报错,等待大佬给出解决方法
[neobox@s2]:<~>$ curl --location 'http://127.0.0.1:4545/v1/chat/completions' --header 'Content-Type: application/json' --data '{"model": "gpt-3.5-turbo", "messages": [{"role": "user", "content": "Say this is a test!"}]}'
{"error":{"code":"error","message":"Unauthorized","param":null,"type":"401 Unauthorized"}}[neobox@s2]:<~>$
[neobox@s2]:<~/test/aurora>$ ./aurora
Error: please put HAR files in harPool directory!
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
- using env: export GIN_MODE=release
- using code: gin.SetMode(gin.ReleaseMode)
[GIN-debug] GET /ping --> main.main.func1 (4 handlers)
[GIN-debug] OPTIONS /v1/chat/completions --> main.optionsHandler (4 handlers)
[GIN-debug] POST /v1/chat/completions --> main.nightmare (4 handlers)
2024/04/03 18:52:00 84288 0.0.0.0:4545