mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-05-25 15:48:07 +08:00
### What problem does this PR solve? fix: Filter out disabled values from the llm options #2072 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
e18f407604
commit
6228b1bd53
@ -64,8 +64,10 @@ export const useSelectLlmOptionsByModelType = () => {
|
|||||||
return {
|
return {
|
||||||
label: key,
|
label: key,
|
||||||
options: value
|
options: value
|
||||||
.filter((x) =>
|
.filter(
|
||||||
modelType ? x.model_type.includes(modelType) : true,
|
(x) =>
|
||||||
|
(modelType ? x.model_type.includes(modelType) : true) &&
|
||||||
|
x.available,
|
||||||
)
|
)
|
||||||
.map((x) => ({
|
.map((x) => ({
|
||||||
label: x.llm_name,
|
label: x.llm_name,
|
||||||
@ -73,7 +75,8 @@ export const useSelectLlmOptionsByModelType = () => {
|
|||||||
disabled: !x.available,
|
disabled: !x.available,
|
||||||
})),
|
})),
|
||||||
};
|
};
|
||||||
});
|
})
|
||||||
|
.filter((x) => x.options.length > 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user