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:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user