lxsiw58b.png

购买云服务器

https://www.dlidc.net/ 鼎力云海外云服务器线路是十分优秀的,推荐我的同款
lxsifdsp.png

安装宝塔面板

这一步我就不详细说了,当然也不是必要条件

安装docker

这是必要条件,宝塔面板的话直接点击安装即可,如果是Linux手撸用户

centos安装docker

首先,需要安装 yum-utils,这是一个扩展的 YUM 工具集,它提供了 yum-config-manager 等实用功能。

sudo yum install -y yum-utils

设置 Docker 仓库
使用 yum-config-manager 工具添加 Docker 的官方仓库。

sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

安装 Docker 引擎
更新 YUM 包索引,然后安装 Docker 引擎

sudo yum makecache fast
sudo yum install -y docker-ce docker-ce-cli containerd.io

Ubuntu 安装 Docker

安装依赖包
安装一些必要的软件包,这些包将允许 apt 通过 HTTPS 使用仓库。

sudo apt install -y apt-transport-https ca-certificates curl software-properties-common

添加 Docker 的官方 GPG 密钥
添加 Docker 仓库的 GPG 密钥,确保软件包的真实性。

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

设置 Docker 仓库
添加 Docker 的官方 APT 仓库到系统中。

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

安装 Docker 引擎
更新 apt 包索引,并安装 Docker 引擎。

sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io

启动 Docker

sudo systemctl start docker
sudo systemctl enable docker

运行项目

到root用户的家目录下运行此命令

cd /root/
docker run -d -p 8008:8008 --restart=unless-stopped --name pandoraweb \
-e PANDORA_SERVER=0.0.0.0:8008 \
-e PANDORA_SITE_PASSWORD=123456 \
-e PANDORA_HISTORY_COUNT=10 \
-e PANDORA_BEST_HISTORY=True \
-e PANDORA_LOCAL_OPTION=True \
-v $PWD/pandora_web_data:/data \
ghcr.io/gavingoo/pandora-web:dev

填写配置文件

lxsiq8dh.png
进入root用户家目录进入这个文件夹,创建一个api.json文件
将以下内容填入

{ 
    "gpt-4o": {
        "slug": "gpt-4o",
        "url": "https://newapi.xsioo.com/v1/chat/completions",
        "auth": "xxxx",
        "prompt": "You use the GPT-4 version of OpenAI’s GPT models.Respond in the following locale: zh-cn.",
        "title": "GPT-4o",
        "description": "强大快速的模型,仅次GPT4",
            "upload": true,
        "max_tokens": 8191 
    },
    "gpt-3.5": {
        "slug": "gpt-3.5-turbo",
        "url": "https://newapi.xsioo.com/v1/chat/completions",
        "auth": "xxxxx",
        "prompt": "You use the GPT-4 version of OpenAI’s GPT models.Respond in the following locale: zh-cn.",
        "title": "gpt-3.5",
        "description": "强大快速的模型,仅次GPT4",
            "upload": true,
        "max_tokens": 8191 
    }
}

{callout color="#f0ad4e"}
这里的auth需要找GPT的api密钥,这里免费送能一直用的4o模型API,仅限小量的用户,大量的用户需要联系我购买因为维护成本也是有的
{/callout}

免费获取途径:添加微信赠送
微信号:ycyaw9961
然后重启容器

docker restart pandoraweb

反代

再用nginx或者caddy反代8008端口即可

分类: Linux教程技术分享 标签: GPT4

评论

暂无评论数据

暂无评论数据

目录