FreeGPT35-Vercel项目说明

我看有人已经发了我为Vercel适配的 FreeGPT35-Vercel

我再发一遍是为了说明一下这个Vercel部署版项目。

这个项目有两个无法解决的限制:

  1. Vercel 的 nodejs运行时 不支持实时流式响应
    所以本项目作为聊天使用体验很差,基本和非流式差不多,要等GPT全部生成完才能看到结果。
  2. 受限于 Vercel 免费计划限制请求最大持续时间10s,所以长回复会出现连接超时。
  3. 以后要是风控严了,这个项目大概率就寄了,估计上游可不会频繁对抗风控。

说完缺点和限制,接下来该说一下优点了。

  • 除了显而易见的Vercel大大的免费额度一键部署以外。
  • 该项目最大的优点就是,并发还不错

Vercel的并发大概有50-60QPS。即使是中小段落翻译任务,并发依然稳在30QPS

所以,玩玩沉浸式翻译,把每次请求最大文本长度调小一点不超时的话,还是不错的。 (自定义域名的情况下)

并发测试水平:

  • 短对话(60QPS): 3598/3600, 成功率99.9%
{"role": "user", "content": content: "Say this is a test!"}

  • 日常翻译(30QPS): 1795/1800, 成功率99.7%
[{"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."}]

test2
.
.
.
.
.
补充:
Vercel Pro计划 请求最大持续时长为300s,懂得都懂,配合一手神墨大佬的Pro,解决长回复超时问题。
不过改为部署我仓库里的 vercel-pro 分支,这个分支配置了300s超时时长。详细看项目readme文档。

19 个赞

沉浸式翻译推荐
每秒最大请求数设置 30
每次请求最大文本长度默认是1200,如果使用中出现504报错,酌情设小一点。

3 个赞

补一句,给飞总 aurora 点点star,今天就破1k

4 个赞

点个赞,收藏下

2 个赞

这个项目带劲

2 个赞

是说怎么动不动报错 FUNCTION_INVOCATION_TIMEOUT
这样说起来还是render好用点,并发100干下去稳得一批啊

2 个赞

点了已经

1 个赞

神墨佬的地址发下,我看怎么配合呢

1 个赞

点了

1 个赞

这个和aurora区别在哪呢

区别大概就是我写的缺点限制部分,优点就是这个项目目前风控比较低,并发还不错。
aurora是一个比较完善的项目,支持多种部署,这个目前主打vercel。

1 个赞

谢谢 我用的就是这个!