我看有人已经发了我为Vercel适配的 FreeGPT35-Vercel
我再发一遍是为了说明一下这个Vercel部署版项目。
这个项目有两个无法解决的限制:
- Vercel 的 nodejs运行时 不支持实时流式响应
所以本项目作为聊天使用体验很差,基本和非流式差不多,要等GPT全部生成完才能看到结果。 - 受限于 Vercel 免费计划限制请求最大持续时间10s,所以长回复会出现连接超时。
以后要是风控严了,这个项目大概率就寄了,估计上游可不会频繁对抗风控。
说完缺点和限制,接下来该说一下优点了。
- 除了显而易见的Vercel大大的免费额度和一键部署以外。
- 该项目最大的优点就是,并发还不错。
Vercel的并发大概有50-60QPS。即使是中小段落翻译任务,并发依然稳在30QPS
所以,玩玩沉浸式翻译
,把每次请求最大文本长度
调小一点不超时的话,还是不错的。 (自定义域名的情况下)
并发测试水平:
{"role": "user", "content": content: "Say this is a test!"}
[{"role": "system", "content": "你是一个专业,地道的翻译引擎,你只返回译文,不含任何解释"},
{"role": "user", "content": "将下面 YAML 格式的文本中的 text 字段翻译为 Simplified Chinese Language,并将翻译结果写在 text 字段中\n\nExample request:\n - id: 1\n text: Source\nExample result:\n - id: 1\n text: Translation\n\n开始翻译:\n\n- id: 1\n text: The Philippines' official vessels infringed on China's rights, made provocations in the disguise of fishery protection, and organized media to hype up misinformation, which undermined stability in the South China Sea, he noted.\n- id: 2\n text: Any tactic infringing on China's rights is futile, he warned.\n- id: 3\n text: The CCG will carry out regular rights protection and law enforcement operations in waters under China's jurisdiction, and resolutely safeguard the country's territorial sovereignty and maritime rights and interests, he said."}]
.
.
.
.
.
补充:
Vercel Pro计划 请求最大持续时长为300s,懂得都懂,配合一手神墨大佬的Pro,解决长回复超时问题。
不过改为部署我仓库里的 vercel-pro
分支,这个分支配置了300s超时时长。详细看项目readme文档。