利用Vercel搭建ChatGPT

logger

技术分享|2023-3-21|最后更新: 2023-3-24|
slug
build-chatgpt-with-vercel
status
Published
type
Post
date
Mar 21, 2023
summary
tags
建站
学习笔记
category
技术分享
password
Property
Mar 24, 2023 05:03 AM
icon

准备工作

  • vercel账号
  • GitHub账号

开始

点击链接:点我部署,点击后,跳转至vercel控制台。
此时会要求填写一个仓库名称(会自动在你的GitHub中创建)
notion image
填写完毕后,填写你的OpenAI的key,以及网站的访问密码(避免公开后被太多人访问)
notion image
填写完毕后,点击Deploy,就开始部署了:
notion image
部署完成:
notion image

访问

部署完成后,点击左下角的网站预览,就可以访问了:
notion image
由于我们配置了网站密码,所以进入时会要求输入一个密码:
notion image

配置域名(大陆专属)

由于vercel.app的域名被qiang,所以如果要在大陆顺利访问,还需要配置域名。
点击Add Domain,在新开页面输入域名后,系统会自动检测是否配置了解析规则,若未配置,此时会检测异常,同时给出需要添加的解析规则:
notion image
在域名服务商页面添加DNS解析完成后,vercel会自动刷新解析结果,出现如下页面,表示解析成功,此时,就可以通过自己的域名访问了:
notion image

参考

  1. Vercel应用绑定自己的域名:https://tangly1024.com/article/vercel-domain
  1. https://juejin.cn/post/7208741162520444984
  1. https://github.com/ddiu8081/chatgpt-demo
  1. https://github.com/ourongxing/chatgpt-vercel
 
  • Waline
  • Giscus
  • Cusdis