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 {
|
||||
label: key,
|
||||
options: value
|
||||
.filter((x) =>
|
||||
modelType ? x.model_type.includes(modelType) : true,
|
||||
.filter(
|
||||
(x) =>
|
||||
(modelType ? x.model_type.includes(modelType) : true) &&
|
||||
x.available,
|
||||
)
|
||||
.map((x) => ({
|
||||
label: x.llm_name,
|
||||
@ -73,7 +75,8 @@ export const useSelectLlmOptionsByModelType = () => {
|
||||
disabled: !x.available,
|
||||
})),
|
||||
};
|
||||
});
|
||||
})
|
||||
.filter((x) => x.options.length > 0);
|
||||
};
|
||||
|
||||
return {
|
||||
|
Loading…
x
Reference in New Issue
Block a user