Feat: Q&A format segmentation support (#668)

Co-authored-by: jyong <718720800@qq.com>
Co-authored-by: StyleZhang <jasonapring2015@outlook.com>
This commit is contained in:
KVOJJJin 2023-07-28 20:47:15 +08:00 • committed by GitHub
commit cf93d8d6e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 2038 additions and 274 deletions

View file

@ -42,12 +42,18 @@ export type DataSetListResponse = {
total: number
}
export type QA = {
question: string
answer: string
}
export type IndexingEstimateResponse = {
tokens: number
total_price: number
currency: string
total_segments: number
preview: string[]
qa_preview?: QA[]
}
export type FileIndexingEstimateResponse = {
@ -148,6 +154,7 @@ export type InitialDocumentDetail = {
display_status: DocumentDisplayStatus
completed_segments?: number
total_segments?: number
doc_form: 'text_model' | 'qa_model'
}
export type SimpleDocumentDetail = InitialDocumentDetail & {
@ -171,6 +178,7 @@ export type DocumentListResponse = {
export type CreateDocumentReq = {
original_document_id?: string
indexing_technique?: string
doc_form: 'text_model' | 'qa_model'
data_source: DataSource
process_rule: ProcessRule
}
@ -293,6 +301,7 @@ export type SegmentDetailModel = {
completed_at: number
error: string | null
stopped_at: number
answer?: string
}
export type SegmentsResponse = {
@ -370,3 +379,8 @@ export type RelatedAppResponse = {
data: Array<RelatedApp>
total: number
}
export type SegmentUpdator = {
content: string
answer?: string
}