mirror of https://github.com/langgenius/dify.git
fix: enhance checklist functionality with embedding and rerank model lists (#27312)
This commit is contained in:
parent
8555635967
commit
95ce224df0
|
|
@ -192,6 +192,8 @@ export const useChecklistBeforePublish = () => {
|
|||
const { getStartNodes } = useWorkflow()
|
||||
const workflowStore = useWorkflowStore()
|
||||
const { getNodesAvailableVarList } = useGetNodesAvailableVarList()
|
||||
const { data: embeddingModelList } = useModelList(ModelTypeEnum.textEmbedding)
|
||||
const { data: rerankModelList } = useModelList(ModelTypeEnum.rerank)
|
||||
|
||||
const getCheckData = useCallback((data: CommonNodeType<{}>, datasets: DataSet[]) => {
|
||||
let checkData = data
|
||||
|
|
@ -211,6 +213,13 @@ export const useChecklistBeforePublish = () => {
|
|||
_datasets,
|
||||
} as CommonNodeType<KnowledgeRetrievalNodeType>
|
||||
}
|
||||
else if (data.type === BlockEnum.KnowledgeBase) {
|
||||
checkData = {
|
||||
...data,
|
||||
_embeddingModelList: embeddingModelList,
|
||||
_rerankModelList: rerankModelList,
|
||||
} as CommonNodeType<KnowledgeBaseNodeType>
|
||||
}
|
||||
return checkData
|
||||
}, [])
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue