[已解决] Nextchat无法调用 New-api

在自己 vps 上使用 docker-compose 一键部署 New-api ,使用官方的 Nextchat 调用 api ,但是无法调用 api

  • 先在 New-api 上创建令牌,在令牌页面点击聊天

  • 显示如下,点击 确认 ,进入网站 https://app.nextchat.dev/#/

Nextchat 调用接口说明: Nextchat 调用接口这块开始填的是 https://localhost:3000 , 我发现调用失败后改成了 https://api.xxx.com , 发现还是调用失败
使用 docker 部署 New-api 默认在 3000 端口,但我使用 cloudflareOrigin Rules , 使得访问 https://api.xxx.com 的自动跳转到 https://api.xxx.com:3000



不知道是哪里出了问题 :upside_down_face:

2 个赞

我来顶一下

1 个赞

NextChat问题很多,直接用佬友ChatBot吧!

1 个赞

谢谢哈比

1 个赞

建议用Cherry Studio

1 个赞

好吧,谢谢推荐,解决不了就只能转战chatbot了 :tieba_087:

又出新的了,我看看去

1 个赞

这个都出好久了

1 个赞

主要是我觉得NextChat也没啥特点,主要是当时ChatGPT刚出来的时候红极一时,很多人都是靠它初识ChatGPT的,但是后来功能就没有其它的项目强劲了,首先它切模型就很麻烦,然后还要各种后缀像@openai,有些模型不加就会报错,还不能自动获取models列表

1 个赞


这个?

3 个赞

nextchat 不在你的服务器上的话,你要给 newapi 配个域名,要不然默认 localhost 怎么ping的上?

1 个赞

开始这块填的是 https://localhost:3000 ,我发现调用失败后改成了 https://api.xxx.com ,发现还是调用失败

使用 docker 部署默认服务开启在 3000 端口,但我使用 cloudflareOrigin Rules ,使得访问 https://api.xxx.com 的自动跳转到 https://api.xxx.com:3000

谢谢佬指正,我发现改为自己的api网址后还是不行

你那个域名忘打码了,快撤回吧hh

1 个赞

看样子他是访问html 了 是不是重写不能把后面接口/v1/xx 重写啊

2 个赞

谢谢提醒,没想到下面还有地址 :tieba_016:

尝试将接口改为 https://localhost:3000/v1https://api.xxx.com/v1, 还是调用不成功

事实上 你用bt 1panel面板 可以nginx 反代到127.0.0.1:3000

cf 这样麻烦 你试试url 通配看看

2 个赞


佬,你的运算符改为等于试试呢

7 个赞

尝试失败,麻烦佬了,我先去看看官方有没有说明 :tieba_087: