mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-31 11:28:51 +00:00
4.8.2-fix (#1612)
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
import { FlowNodeTypeEnum } from '@fastgpt/global/core/workflow/node/constant';
|
||||
import { NodeInputKeyEnum } from '@fastgpt/global/core/workflow/constants';
|
||||
import type { StoreNodeItemType } from '@fastgpt/global/core/workflow/type/index.d';
|
||||
|
||||
export const getChatModelNameListByModules = (modules: StoreNodeItemType[]): string[] => {
|
||||
const chatModules = modules.filter((item) => item.flowNodeType === FlowNodeTypeEnum.chatNode);
|
||||
return chatModules
|
||||
export const getChatModelNameListByModules = (nodes: StoreNodeItemType[]): string[] => {
|
||||
return nodes
|
||||
.map((item) => {
|
||||
const model = item.inputs.find((input) => input.key === 'model')?.value;
|
||||
const model = item.inputs.find((input) => input.key === NodeInputKeyEnum.aiModel)?.value;
|
||||
return global.llmModels.find((item) => item.model === model)?.name || '';
|
||||
})
|
||||
.filter(Boolean);
|
||||
|
Reference in New Issue
Block a user