fix: chat model select
This commit is contained in:
parent
383fe66cd7
commit
c3d55d5c8f
@ -6,9 +6,10 @@ export const getChatModelNameListByModules = (nodes: StoreNodeItemType[]): strin
|
||||
const modelList = nodes
|
||||
.map((item) => {
|
||||
const model = item.inputs.find((input) => input.key === NodeInputKeyEnum.aiModel)?.value;
|
||||
return getLLMModel(model)?.name || '';
|
||||
return model ? getLLMModel(model)?.name : '';
|
||||
})
|
||||
.filter(Boolean);
|
||||
|
||||
console.log(JSON.stringify(nodes, null, 2), '---=');
|
||||
console.log(modelList, '---=');
|
||||
return Array.from(new Set(modelList));
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user