knowledge base default data

This commit is contained in:
zxhlyh
2025-05-28 13:56:03 +08:00
parent 29d2f2339b
commit b9214ca76b
11 changed files with 91 additions and 59 deletions

View File

@ -1,11 +1,5 @@
import type { NodeDefault } from '../../types'
import type { KnowledgeBaseNodeType } from './types'
import {
ChunkStructureEnum,
HybridSearchModeEnum,
IndexMethodEnum,
RetrievalSearchMethodEnum,
} from './types'
import { genNodeMetaData } from '@/app/components/workflow/utils'
import { BlockEnum } from '@/app/components/workflow/types'
@ -17,15 +11,11 @@ const nodeDefault: NodeDefault<KnowledgeBaseNodeType> = {
metaData,
defaultValue: {
index_chunk_variable_selector: [],
chunk_structure: ChunkStructureEnum.general,
indexing_technique: IndexMethodEnum.QUALIFIED,
keyword_number: 10,
retrieval_model: {
search_method: RetrievalSearchMethodEnum.hybrid,
top_k: 2,
score_threshold_enabled: false,
score_threshold: 0.5,
hybridSearchMode: HybridSearchModeEnum.WeightedScore,
},
},
checkValid() {