diff --git a/ui/src/api/log.ts b/ui/src/api/log.ts index 3880b21b0..dc1e27e91 100644 --- a/ui/src/api/log.ts +++ b/ui/src/api/log.ts @@ -98,9 +98,28 @@ const putChatRecordLog: ( ) } +/** + * 获取标注段落列表信息 + * @param 参数 + * application_id, chart_id, chart_record_id + */ +const getMarkRecord: ( + applicaiton_id: String, + chart_id: String, + chart_record_id: String, + loading?: Ref +) => Promise> = (applicaiton_id, chart_id, chart_record_id, loading) => { + return get( + `${prefix}/${applicaiton_id}/chat/${chart_id}/chat_record/${chart_record_id}/improve`, + undefined, + loading + ) +} + export default { getChatLog, delChatLog, getChatRecordLog, - putChatRecordLog + putChatRecordLog, + getMarkRecord } diff --git a/ui/src/api/paragraph.ts b/ui/src/api/paragraph.ts index d85cb6b68..f29376160 100644 --- a/ui/src/api/paragraph.ts +++ b/ui/src/api/paragraph.ts @@ -67,9 +67,10 @@ const delParagraph: ( const postParagraph: ( dataset_id: string, document_id: string, - data: any -) => Promise> = (dataset_id, document_id, data: any) => { - return post(`${prefix}/${dataset_id}/document/${document_id}/paragraph`, data) + data: any, + loading?: Ref +) => Promise> = (dataset_id, document_id, data, loading) => { + return post(`${prefix}/${dataset_id}/document/${document_id}/paragraph`, data, undefined, loading) } /** @@ -92,9 +93,15 @@ const putParagraph: ( dataset_id: string, document_id: string, paragraph_id: string, - data: any -) => Promise> = (dataset_id, document_id, paragraph_id, data: any) => { - return put(`${prefix}/${dataset_id}/document/${document_id}/paragraph/${paragraph_id}`, data) + data: any, + loading?: Ref +) => Promise> = (dataset_id, document_id, paragraph_id, data, loading) => { + return put( + `${prefix}/${dataset_id}/document/${document_id}/paragraph/${paragraph_id}`, + data, + undefined, + loading + ) } /** diff --git a/ui/src/components/ai-chat/LogOperationButton.vue b/ui/src/components/ai-chat/LogOperationButton.vue index ebc65e06c..4f48a49e0 100644 --- a/ui/src/components/ai-chat/LogOperationButton.vue +++ b/ui/src/components/ai-chat/LogOperationButton.vue @@ -11,34 +11,41 @@ - - + - - - - + + + + + - + + diff --git a/ui/src/components/ai-chat/index.vue b/ui/src/components/ai-chat/index.vue index 2a26f9089..daac9ef21 100644 --- a/ui/src/components/ai-chat/index.vue +++ b/ui/src/components/ai-chat/index.vue @@ -1,5 +1,5 @@