-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
✨ feat: support configuring multiple agent index urls #1648
base: main
Are you sure you want to change the base?
Conversation
@LeoQuote is attempting to deploy a commit to the LobeHub Team on Vercel. A member of the Team first needs to authorize it. |
Thank you for raising your pull request and contributing to our Community |
126dee0
to
dfe3dfb
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1648 +/- ##
=======================================
Coverage 92.57% 92.58%
=======================================
Files 239 239
Lines 13066 13066
Branches 1562 1562
=======================================
+ Hits 12096 12097 +1
+ Misses 970 969 -1 ☔ View full report in Codecov by Sentry. |
dfe3dfb
to
6b2aea3
Compare
marketId 是不是应该也支持字符串?这样的话可以实现用 id 来控制,以及后续让用户手动添加不同的助手市场? |
Should marketId also support strings? In this case, it is possible to use id to control, and then allow users to manually add different assistant markets? |
配置不太好做,这个设计是用逗号分隔,用index 做market id,如果想加入名字,需要改成字典配置,有点麻烦了 |
The configuration is not easy to do. This design uses commas to separate and use index as the market ID. If you want to add a name, you need to change it to a dictionary configuration, which is a bit troublesome. |
fix #1559
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
新增了多个 market 中心的支持, 支持方式如下:
接口层面, market index api 会尝试将 AGENTS_INDEX_URL 用逗号分开, 然后逐个请求, 最后将其合并( 不去重 )
market api 会接受新的参数 ,marketId, 使用 identifier, marketId 这两个参数, 可以前往不同的 market 获取相关信息, 在获取到信息后, 将 marketId 再重新注入到返回体内返回给前端
UI 层面, 在点击卡片时, 会set 两个 store, currentIdentifier , currentMarketId, 最后关联到 url 上, 即可请求到正确的资源
新增多个 plugin 中心的支持, 更改较少, 仅需更改 api, 在后端分别请求两个 index 即可.
验证方式:
设置环境变量
启动服务, 观察到有重复的两波 agent 和插件, 符合预期
📝 补充信息 | Additional Information