一键搭建 web 版 chatGPT,无需魔法,国内可用

在 GitHub 上有很多 web 版本的 ChatGPT 项目,感谢这些开源作者,我们能很方便的搭建属于自己的 ChatGPT。今天介绍的这个操作快的话,30 分钟能搞定。
前置条件
1. 需要拥有 chatGPT 的 api key。申请地址https://platform.openai.com/account/api-keys
2. 国内的二级域名。
3. cloudflare 账号
下面的所有步骤都可以不用🪜(github 打不开的话就还得用),操作步骤如下:
1. 打开开源项目:: https://github.com/Yidadaa/ChatGPT-Next-Web
2. 点击 Deploy 部署项目到 vercel 上

3. 在 vercel 上注册一个账号,可用用 GitHub 账号,给予授权即可。

4. 点击 create 创建,然后等待即可。

5. 录入 chatGPT 的 key 和访问密码。有访问密码才能使用你部署的 chatGPT

6. 点 Deploy 后,就等待部署,大概 1 分多钟时间


7. 部署成功后,点 continue to dashboard ,可以看到,它有一个默认域名。

这个域名只能通过梯子访问。如果想要国内访问,你还得在设置里添加一个自己国内的域名

8. 配置域名解析。下图是阿里云的域名解析配置
添加一个二级域名到 cname.vercel-dns.com

9. 最后一步是注册 cloudflare 账户,并在上面添加你的域名进行管理。
这一步不是必须的,如果你的域名本身就做过 DNS 加速,国内可以正常访问就不用在做下面的操作,如果你测试打不开,那么就按照下面的方法注册,设置一个 DNS 代理。
地址:https://dash.cloudflare.com/
注册后,选择免费计划,然后添加一个节点,录入你的根域名,点击添加后就可以了。

添加完站点后,到 DNS 这里看下是否被代理


如果这里没有自动代理你的子域名,那么你就得手动添加一下。大概 5 分钟左右就能生效。也就是说你部署的域名可以在国内正常打开了。
版权声明: 本文为 InfoQ 作者【石云升】的原创文章。
原文链接:【http://xie.infoq.cn/article/65bc8a2dc68b866bfe05f0513】。
本文遵守【CC-BY 4.0】协议,转载请保留原文出处及本版权声明。
评论 (2 条评论)