-
-
Notifications
You must be signed in to change notification settings - Fork 10.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
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.96% 98.14% +6.17%
==========================================
Files 548 12 -536
Lines 41463 2913 -38550
Branches 2517 154 -2363
==========================================
- Hits 38132 2859 -35273
+ Misses 3331 54 -3277
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;
}); |
0ef6ce7
to
1a492ec
Compare
改了。 我测试时看到有些 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