-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
fix: correct the model list on the model provider's page #5043
base: main
Are you sure you want to change the base?
Conversation
@lc-soft is attempting to deploy a commit to the LobeHub Team on Vercel. A member of the Team first needs to authorize it. |
👍 @lc-soft Thank you for raising your pull request and contributing to our Community |
5859ddd
to
0ef6ce7
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5043 +/- ##
========================================
Coverage 91.97% 91.97%
========================================
Files 548 548
Lines 41352 41355 +3
Branches 2513 2356 -157
========================================
+ Hits 38032 38035 +3
Misses 3320 3320
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@lc-soft 影响到了其他 Provider ,尝试改成这样试试? let model = list.find((item) => {
const ids = item.identifier.split('/');
return ids[1] === id || item.identifier === id;
}); |
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
模型列表去重时是以
/
后的名称作为唯一键的:When deduplicating model lists, the name after the
/
is used as the unique key:以 Qwen/Qwen2-7B-Instruct 为例,Gitee AI 中记录的模型 id 是
Qwen2-7B-Instruct
,其它提供商的模型 id 是Qwen/Qwen2-7B-Instruct
,这种情况下,靠判断item.identifier === id
是找不到 Gitee AI 的Qwen2-7B-Instruct
模型详细的。Using Qwen/Qwen2-7B-Instruct as an example, the model ID recorded in Gitee AI is
Qwen2-7B-Instruct
, while the model ID for other providers isQwen/Qwen2-7B-Instruct
. In this case, it is not possible to find detailed information about the Gitee AI'sQwen2-7B-Instruct
model by determining thatitem.identifier === id
.因此,改成与
getModelList()
中相同的方式获取 id 再进行判断。Therefore, it is changed to obtain the id in the same way as in
getModelList()
and then make a judgment.📝 补充信息 | Additional Information
Before:
The total number of models is 4 +2
After:
The total number of models is 4 +10