4.8.11 perf (#2832)

* save toast

* perf: surya ocr

* perf: remove same model name

* fix: indexes

* perf: ip check

* feat: Fixed the version number of the subapplication

* feat: simple app get latest child version

* perf: update child dispatch variables

* feat: variables update doc
This commit is contained in:
Archer
2024-09-28 15:31:25 +08:00
committed by GitHub
parent f7a8203454
commit f2749cbb00
34 changed files with 393 additions and 263 deletions

View File

@@ -2,10 +2,12 @@ import { NodeInputKeyEnum } from '@fastgpt/global/core/workflow/constants';
import type { StoreNodeItemType } from '@fastgpt/global/core/workflow/type/node.d';
export const getChatModelNameListByModules = (nodes: StoreNodeItemType[]): string[] => {
return nodes
const modelList = nodes
.map((item) => {
const model = item.inputs.find((input) => input.key === NodeInputKeyEnum.aiModel)?.value;
return global.llmModels.find((item) => item.model === model)?.name || '';
})
.filter(Boolean);
return Array.from(new Set(modelList));
};