Feat: Add LlmSettingFieldItems component #3221 (#4906)

### What problem does this PR solve?

Feat: Add LlmSettingFieldItems component #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-02-12 15:43:31 +08:00
committed by GitHub
parent b08bb56f6c
commit 7f06712a30
6 changed files with 282 additions and 5 deletions

View File

@ -116,7 +116,11 @@ export const useComposeLlmOptionsByModelTypes = (
) => {
const allOptions = useSelectLlmOptionsByModelType();
return modelTypes.reduce<DefaultOptionType[]>((pre, cur) => {
return modelTypes.reduce<
(DefaultOptionType & {
options: { label: JSX.Element; value: string; disabled: boolean }[];
})[]
>((pre, cur) => {
const options = allOptions[cur];
options.forEach((x) => {
const item = pre.find((y) => y.label === x.label);