Giter Site home page Giter Site logo

Comments (7)

arvinxx avatar arvinxx commented on May 19, 2024

插件服务从 lobe-chat 里剥离出来了。目前代码中的插件服务会走到插件服务网关去(项目地址:https://github.com/lobehub/chat-plugins-server ),默认的插件网关为 https://lobe-chat-plugin-market.vercel.app ,这个地址国内直接访问是被墙的。

你本地使用的话,可以在项目目录下添加一个 .env 文件,然后填入:

PLUGIN_RUNNER_BASE_URL=https://chat-plugins.lobehub.com

让本地走到 lobehub 的域名,这样国内就能正常访问到了

from lobe-chat.

WyInnovate avatar WyInnovate commented on May 19, 2024

插件服务从 lobe-chat 里剥离出来了。目前代码中的插件服务会走到插件服务网关(项目地址:lobehub/chat-plugins-server )去,目前项目的网关地址配置了 https://lobe-chat-plugin-market.vercel.app ,这个地址国内直接访问是被墙的。

你本地使用的话,可以在项目目录下添加一个 .env 文件,然后填入:

PLUGIN_RUNNER_BASE_URL=https://chat-plugins.lobehub.com

让本地走到 lobehub 的域名,这样国内就能正常访问到了

步骤

  1. 增加.env文件
  2. .env文件内填写[PLUGIN_RUNNER_BASE_URL=https://chat-plugins.lobehub.com]
  3. cd D:\git\lobe-chat
  4. pnpm start
  5. info Loaded env from D:\git\lobe-chat.env
  6. 新建助手
  7. 输入[https://sspai.com/post/81986]
  8. 很抱歉,服务器没有等到上游服务器的回应,请稍后再试
  9. F12显示Failed to load resource: the server responded with a status of 504 (Gateway Timeout) :3000/api/openai:1

其他补充

API KEY 是能够使用的,接口代理地址是[https://xxxx/v1]也是可以正常使用的,在随便聊聊窗口输入你都会什么,都会提示很抱歉,服务器没有等到上游服务器的回应,请稍后再试,是接口代理地址没生效还是什么?

from lobe-chat.

arvinxx avatar arvinxx commented on May 19, 2024

哦,那看来不是插件的问题,是正常访问 OpenAI 的问题。

应该是接口代理没生效。你试试看在 .env 里添加一个

OPENAI_PROXY_URL=https://xxx/v1

然后重新 pnpm start 试试

from lobe-chat.

WyInnovate avatar WyInnovate commented on May 19, 2024

哦,那看来不是插件的问题,是正常访问 OpenAI 的问题。

应该是接口代理没生效。你试试看在 .env 里添加一个

OPENAI_PROXY_URL=https://xxx/v1

然后重新 pnpm start 试试

设置了OPENAI_PROXY_URL后,无问题,但是PLUGIN_RUNNER_BASE_URL没生效,目前.env内容如下:

PLUGIN_RUNNER_BASE_URL=https://chat-plugins.lobehub.com
OPENAI_PROXY_URL=https://xxx/v1

启用插件后,输入文章网址,终端提示内容如下:

- ready started server on 0.0.0.0:3000, url: http://localhost:3000
- info Loaded env from D:\git\lobe-chat\.env
Failed to proxy https://lobe-chat-plugin-market.vercel.app/api/v1/runner Error: connect ETIMEDOUT 168.143.171.189:443
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16) {
  errno: -4039,
  code: 'ETIMEDOUT',
  syscall: 'connect',
  address: '168.143.171.189',
  port: 443
}
Error: connect ETIMEDOUT 168.143.171.189:443
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16) {
  errno: -4039,
  code: 'ETIMEDOUT',
  syscall: 'connect',
  address: '168.143.171.189',
  port: 443
}

from lobe-chat.

arvinxx avatar arvinxx commented on May 19, 2024

奇怪,我回头试试看。 如果现在 env 不生效的话,解决方案直接手动改 next.config.mjs 里 第8行

  process.env.PLUGIN_RUNNER_BASE_URL || 'https://lobe-chat-plugin-market.vercel.app';

https://lobe-chat-plugin-market.vercel.app 替换为 https://chat-plugins.lobehub.com

然后再 pnpm start 试试看。

from lobe-chat.

WyInnovate avatar WyInnovate commented on May 19, 2024

奇怪,我回头试试看。 如果现在 env 不生效的话,解决方案直接手动改 next.config.mjs 里 第8行

  process.env.PLUGIN_RUNNER_BASE_URL || 'https://lobe-chat-plugin-market.vercel.app';

https://lobe-chat-plugin-market.vercel.app 替换为 https://chat-plugins.lobehub.com

然后再 pnpm start 试试看。

pnpm build
pnpm start
已解决

from lobe-chat.

canisminor1990 avatar canisminor1990 commented on May 19, 2024

🎉 This issue has been resolved in version 0.54.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

from lobe-chat.

Related Issues (20)

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.