feat: upgrade knowledge metadata (#16063)
Support filter knowledge by metadata. Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: NFish <douxc512@gmail.com>
This commit is contained in:
parent
475b8d731e
commit
20376ca951
72 changed files with 4775 additions and 101 deletions
|
|
@ -2,6 +2,8 @@ import type { DataSourceNotionPage, DataSourceProvider } from './common'
|
|||
import type { AppIconType, AppMode, RetrievalConfig } from '@/types/app'
|
||||
import type { Tag } from '@/app/components/base/tag-management/constant'
|
||||
import type { IndexingType } from '@/app/components/datasets/create/step-two'
|
||||
import type { MetadataFilteringVariableType } from '@/app/components/workflow/nodes/knowledge-retrieval/types'
|
||||
import type { MetadataItemWithValue } from '@/app/components/datasets/metadata/types'
|
||||
|
||||
export enum DataSourceType {
|
||||
FILE = 'upload_file',
|
||||
|
|
@ -21,6 +23,13 @@ export enum ChunkingMode {
|
|||
parentChild = 'hierarchical_model', // Parent-Child
|
||||
}
|
||||
|
||||
export type MetadataInDoc = {
|
||||
value: string
|
||||
id: string
|
||||
type: MetadataFilteringVariableType
|
||||
name: string
|
||||
}
|
||||
|
||||
export type DataSet = {
|
||||
id: string
|
||||
name: string
|
||||
|
|
@ -56,6 +65,8 @@ export type DataSet = {
|
|||
score_threshold: number
|
||||
score_threshold_enabled: boolean
|
||||
}
|
||||
built_in_field_enabled: boolean
|
||||
doc_metadata?: MetadataInDoc[]
|
||||
}
|
||||
|
||||
export type ExternalAPIItem = {
|
||||
|
|
@ -314,6 +325,7 @@ export type SimpleDocumentDetail = InitialDocumentDetail & {
|
|||
extension: string
|
||||
}
|
||||
}
|
||||
doc_metadata?: MetadataItemWithValue[]
|
||||
}
|
||||
|
||||
export type DocumentListResponse = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue