Code Monkey home page Code Monkey logo

freegpt35-vercel's Introduction

简体中文 / English

Vercel免费版升级为60s

依然存在的问题

  • 超过60s之后会断流。(因为Vercel免费版持续时间最大值60秒,因此使用沉浸式翻译记得降低最大文本长度到600左右,并发30)。

解决办法:

Vercel Pro 计划 超时上限为300s,并且自带cron计划任务跳转Pro部署介绍


Vercel一键部署按钮

Deploy with Vercel

暂时不需要数据库和定时任务,可以一键部署了


部署项目 数据库和定时任务暂时不需要了,后面再想吧

以下均建议绑定自定义域名解决Vercel域名被阻断问题

方式一: fork仓库部署 Vercel

  1. fork 本仓库,fork时,取消勾选 Copy the main branch only
  2. 进入Vercel,导入您fork的仓库
  3. 点击Deploy,等待部署完成
  4. (可选) 在SettingsDomains下绑定你自己的域名。 转到顶部Deployments选项卡,Redeploy重新部署你的项目
  5. 完成! 鼓掌

方式二: Vercel Pro 计划的尊贵用户,移除请求最大持续时间10s上限,自带cron定时任务

  1. 前几步部署和上述相同
  2. 只需在最后Redeploy重新部署前,到Settings下的Git页面,在Production Branch填入vercel-pro点击Save guide
  3. 然后转到顶部Deployments选项卡,注意不要在下面已经部署的记录里选!!!,点击如图右上角的三个点 Create Deployment选择vercel-pro然后Create Deployment deploy
  4. 完成! 鼓掌

请求示例

如果你没有设置AUTH_TOKEN,你可以不传递Authorization,也可以随意传递任何字符串。

curl https://[Your Vercel Domain]/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer any_string_you_like" \
  -d '{
    "model": "gpt-3.5-turbo",
    "messages": [
      {
        "role": "user",
        "content": "Hello!"
      }
    ],
    "stream": true
    }'

高级设置

环境变量 (如果你不知道是干嘛的,请不要随意设置)

Key 示例值 解释 要求
AUTH_TOKEN myapikey 你为自己接口设置的apikey。 可选

兼容性

您可以在任何客户端中使用它,如 OpenCatNext-ChatLobe-ChatBob 等。在API Key中随意填写任何字符串或者你设置了AUTH_TOKEN,就填写它。

Bob

Bob

Credits

Similar Project

  • aurora: Golang development, support for multiple deployment methods

License

AGPL 3.0 License

freegpt35-vercel's People

Contributors

cliouo avatar k0baya avatar missuo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

freegpt35-vercel's Issues

私有化部署问题

up,请求最大持续时间10s上限,20美金有点顶不住哇,大佬能否出个部署到自己服务器的教程~感谢!

增加流式输出

Vercel部署后在nextchat里使用,没有流式输出。希望可以支持流式

SFW错误

我用docker-compose搭建的,访问出错:

{
  "status": false,
  "error": {
    "message": "An error happened, please make sure your request is SFW, or use a jailbreak to bypass the filter.",
    "type": "invalid_request_error"
  }
}

关于我提供的试用接口的说明

试用api为单账号部署,额度不高,目前禁止接入oneapi等分发平台

以上均使用Vercel Pro和Upstash账号部署,受限单账号Upstash数据库每日10k调用限制,以上试用接口每天大概能用8k
其中:

  • testgpt.iqaq.me我是有消息日志记录的 ,防止号商白嫖,使用量太高时我会看一下是不是号商
    (就是能看到你发了啥,为了保留查询,一般不会看,介意的话自己部署)
  • chat.iqaq.me没有消息日志记录

今日发现试用API的 16token/4min,在下午有一个b 2分钟2.5k请求下出现429频繁,所以提升到24token/3min
虽然不算违规,但还是建议用量大的自己部署一下

方法二 图片有误

第6部下面图片的变量名称应该是UPSTASH_REDIS_REST_URL和UPSTASH_REDIS_REST_TOKEN

Docker 部署 ChatGPT-Next-Web 问题

首先感谢大神的付出!
服务器Docker 部署之后(已再环境中设置BASE_URL:http://[ip]:3040)打开ChatGPT-Next-Web 的页面需要手动设置 【自定义接口】- 【接口地址】 改成FreeGPT35 部署后的地址http://[ip]:3040 不然用不了,怎么解可以在打开ChatGPT-Next-Web 不需要重新配置自定义接口地址?

关于分支有个问题想问一下

vercel部署的时候是部署main分支吗?
那为什么需要取消勾选Copy the main branch only呢?
这里不太明白,希望作者解答一下。

别的都很棒棒,给作者点赞!

自定义域名后报错Unauthorized

只有使用openAI的python库发起请求是正常的
用python requests,或是在chatGPT Next中,都是报错:Unauthorized
另外,使用https://freegpt35.iqaq.me/都OK,需要在vercel中进行什么额外设置?

在沉浸翻译里500: fetchError

500: fetchError

是按照在沉浸式翻译中使用接口地址:https://freechatgpt35-XXXX-projects.vercel.app/v1/chat/completions这种格式设定的呀?

POST

/v1/chat/completions

xxx
TypeError: Cannot read properties of undefined (reading 'startsWith')
at new n (/var/task/node_modules/@upstash/redis/nodejs.js:1:834)
at new VercelKV (file:///var/task/node_modules/@vercel/kv/dist/index.js:5:16)
at createClient (file:///var/task/node_modules/@vercel/kv/dist/index.js:61:10)
at handleChatCompletion (file:///var/task/api/index.js:138:13)
at Server. (/var/task/___vc/__launcher/helpers-N7IX3CRI.js:1:7894)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Server. (/var/task/___vc/__launcher/bridge-server-BGIDXK2J.js:1:9443)

[POST] /v1/chat/completions status=500

Status已经是ready了,https://freechatgpt35-XXXX-projects.vercel.app/ 也是能打开的,但是设置到沉浸式翻译中就不好用了。
请问这是什么问题啊?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.