Table of Contents
Open Table of Contents
原因
因为国内无法直接访问openai,openai也不支持国内区域。部署后,可以让朋友们一起使用,免去了一些复杂过程。
[OpenCat](OpenCat on the App Store (apple.com))
- 一款ChatGPT客户端,支持mac和iOS
- 支持docker
私有部署
,部署后可以分享给朋友使用
Fly.io
- 免费计划可以使用3个共享cpu的虚拟机,3GB储存和160GB下行数据,足够支持我们部署后的使用
准备
私有部署
1. 配置文件
使用𝔽𝕣𝕠𝕤𝕥 𝕄𝕚𝕟𝕘分享的配置
kill_signal = "SIGINT"
kill_timeout = 5
primary_region = "sin"
processes = []
[build]
image = "bayedev/opencatd"
[mount]
source = "opencat"
destination = "/opt/db"
[experimental]
auto_rollback = true
[[services]]
internal_port = 80
protocol = "tcp"
[services.concurrency]
hard_limit = 25
soft_limit = 20
type = "connections"
[[services.ports]]
force_https = true
handlers = ["http"]
port = 80
[[services.ports]]
handlers = ["tls", "http"]
port = 443
[[services.tcp_checks]]
grace_period = "1s"
interval = "15s"
restart_limit = 0
timeout = "2s"
2. 安装fly的命令行工具
#Mac
brew install flyctl
#Linux
curl -L https://fly.io/install.sh | sh
#Windows
powershell -Command "iwr https://fly.io/install.ps1 -useb | iex"
3. 登录fly
fly auth login
4. 本地建立目录,创建fly.tomal文件并复制上面的配置内容
5. 创建和部署App
创建的区域节点尽量选择美国的
fly launch --copy-config
fly vol create opencat --size 1
fly deploy
6. 绑定域名
Fly.io提供SSL证书,在dashboard中配置一下
7. 在 OpenCat 中配置
- 在OpenCat中创建团队,填入绑上的域名,填上 openai 的 key 就能直接使用了
- 若要使用微软的TTS,登录Azure后,创建语音资源,在OpenCat配置中选择区域,填上token