### What problem does this PR solve? Fix: The same model appears twice in the drop-down box. #10102 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
a23a0f230c
commit
c29c395390
1 changed files with 6 additions and 1 deletions
|
|
@ -155,7 +155,12 @@ export const useComposeLlmOptionsByModelTypes = (
|
|||
options.forEach((x) => {
|
||||
const item = pre.find((y) => y.label === x.label);
|
||||
if (item) {
|
||||
item.options.push(...x.options);
|
||||
x.options.forEach((y) => {
|
||||
// A model that is both an image2text and speech2text model
|
||||
if (!item.options.some((z) => z.value === y.value)) {
|
||||
item.options.push(y);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
pre.push(x);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue