-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Request] 支持设置多个插件 index, agent index #1559
Comments
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. |
🥰 Description of requirementsAfter privatized deployment, there is sometimes a need to set up your own plug-in center and agent center. However, if you simply replace it, you will lose the community advantages you had before. Mirroring the community center to a private plug-in center can be achieved, but Not particularly elegant. So at this time, if multiple 🧐 SolutionTake the agent market as an example lobe-chat/src/app/api/market/route.ts Line 10 in 0988466
Here, get config, separate it with 📝 Supplementary informationNo response |
好想法,考不考虑写个 RFC 然后来个PR ? |
Great idea, would you consider writing an RFC and then issuing a PR? |
@arvinxx 嗯,可以等我,我大概下周或者下下周尝试实现,看起来只是需要多实例化一个对象 |
@arvinxx Well, you can wait for me. I will try to implement it probably next week or the next week. It seems that I just need to instantiate one more object. |
仔细看了下代码, 这边实现的方式不会太优雅或者简单, 如果说两个 index url 分成N个接口, 前端分别请求, 改动还挺大的, 从前端的 service 到后端的 API 全部都要更改, 以 agent 市场为例, 包括以下部分:
如果说不更改接口的 url 和返回体, 那就是后端来拼合两个 index url, 而请求具体的 agent json 时, 是逐个 fallback, 首先拼合这个方案就不太优雅, 再有就是 fallback 方案可能会有一些不必要的请求, 甚至还有一些隐私方面的潜在问题. 所以综合考虑下来, 工程量还是比我想得大的, 看看有什么建议, 有什么更好的方案? |
After carefully looking at the code, the implementation method here is not too elegant or simple. If the two index URLs are divided into N interfaces, and the front end requests them separately, the changes are quite big, from the front-end service to the back-end API. Changes, taking the agent market as an example, include the following parts:
If the url and return body of the interface are not changed, then the backend has to combine the two index urls, and when requesting the specific agent json, it will fallback one by one. First of all, it is not very elegant to combine this solution, and then the fallback solution may There are some unnecessary requests and even some potential privacy issues. So after comprehensive consideration, the project volume is still larger than I thought. I would like to see if you have any suggestions. Is there any better solution? |
|
|
🥰 需求描述
私有化部署后, 有时候有自己设置自己的插件中心和 agent 中心的需求, 但是如果简单的替换, 会丧失之前拥有的社区优势, 而镜像社区的中心到私有的插件中心, 虽然可以实现, 但是不算特别优雅.
所以此时如果
AGENTS_INDEX_URL
和PLUGINS_INDEX_URL
中可以配置多个, 那么就可以解决这个问题🧐 解决方案
以 agent 市场为例
lobe-chat/src/app/api/market/route.ts
Line 10 in 0988466
此处get 到 config, 并用
,
分割开, 实例化两个 AgentMarket 对象, 并分别 fetch , 应该可以达到需求.📝 补充信息
No response
The text was updated successfully, but these errors were encountered: