Merge branch 'feat/parent-child-retrieval' of https://github.com/langgenius/dify into feat/parent-child-retrieval

This commit is contained in:
twwu
2024-12-06 17:19:25 +08:00
11 changed files with 306 additions and 126 deletions

View File

@ -151,7 +151,7 @@ export type IndexingEstimateResponse = {
total_price: number
currency: string
total_segments: number
preview: string[]
preview: Array<{ content: string; child_chunks: string[] }>
qa_preview?: QA[]
}
@ -304,7 +304,7 @@ export type DocumentListResponse = {
export type DocumentReq = {
original_document_id?: string
indexing_technique?: string
doc_form: 'text_model' | 'qa_model'
doc_form: ChuckingMode
doc_language: string
process_rule: ProcessRule
}
@ -346,7 +346,7 @@ export type NotionPage = {
}
export type ProcessRule = {
mode: string
mode: ChildChunkType | 'hierarchical'
rules: Rules
}
@ -623,3 +623,23 @@ export type ChildSegmentResponse = {
page: number
limit: number
}
export type UpdateDocumentParams = {
datasetId: string
documentId: string
}
// Used in api url
export enum DocumentActionType {
enable = 'enable',
disable = 'disable',
archive = 'archive',
unArchive = 'un_archive',
delete = 'delete',
}
export type UpdateDocumentBatchParams = {
datasetId: string
documentId?: string
documentIds?: string[] | string
}