diff --git a/ui/src/api/document.ts b/ui/src/api/document.ts index 6ee443c2e..2080c562e 100644 --- a/ui/src/api/document.ts +++ b/ui/src/api/document.ts @@ -25,7 +25,7 @@ const listSplitPattern: ( } /** - * 文档列表 + * 文档分页列表 * @param 参数 dataset_id, * page { "current_page": "string", @@ -49,6 +49,13 @@ const getDocument: ( ) } +const getAllDocument: (dataset_id: string, loading?: Ref) => Promise> = ( + dataset_id, + loading +) => { + return get(`${prefix}/${dataset_id}/document`, undefined, loading) +} + /** * 创建批量文档 * @param 参数 @@ -117,6 +124,7 @@ const getDocumentDetail: (dataset_id: string, document_id: string) => Promise +) => Promise> = ( + applicaiton_id, + chart_id, + chart_record_id, + dataset_id, + document_id, + data, + loading +) => { + return put( + `${prefix}/${applicaiton_id}/chat/${chart_id}/chat_record/${chart_record_id}/dataset/${dataset_id}/document_id/${document_id}/improve`, + data, + undefined, + loading + ) +} + export default { getChatLog, delChatLog, - getChatRecordLog + getChatRecordLog, + putChatRecordLog } diff --git a/ui/src/api/type/application.ts b/ui/src/api/type/application.ts index 6e15c8e5d..4728c54f2 100644 --- a/ui/src/api/type/application.ts +++ b/ui/src/api/type/application.ts @@ -23,7 +23,7 @@ interface chatType { */ is_stop?: boolean record_id: string - vote_status: string + vote_status: string, } export class ChatRecordManage { diff --git a/ui/src/assets/logo.svg b/ui/src/assets/logo.svg index 756566035..cf5f3ffb8 100644 --- a/ui/src/assets/logo.svg +++ b/ui/src/assets/logo.svg @@ -1 +1,19 @@ - + + + + + + + + + + + + + + + + + + + diff --git a/ui/src/components/ai-chat/LogOperationButton.vue b/ui/src/components/ai-chat/LogOperationButton.vue new file mode 100644 index 000000000..32d31fe9c --- /dev/null +++ b/ui/src/components/ai-chat/LogOperationButton.vue @@ -0,0 +1,65 @@ + + + diff --git a/ui/src/components/ai-chat/OperationButton.vue b/ui/src/components/ai-chat/OperationButton.vue index aa575adff..35b289735 100644 --- a/ui/src/components/ai-chat/OperationButton.vue +++ b/ui/src/components/ai-chat/OperationButton.vue @@ -71,7 +71,8 @@ const props = defineProps({ chartId: { type: String, default: '' - } + }, + log: Boolean }) const emit = defineEmits(['update:data', 'regeneration']) @@ -79,7 +80,7 @@ const emit = defineEmits(['update:data', 'regeneration']) const buttonData = ref(props.data) const loading = ref(false) -function regeneration() { +function regeneration() { emit('regeneration') } diff --git a/ui/src/components/ai-chat/index.vue b/ui/src/components/ai-chat/index.vue index 141a9272a..711001170 100644 --- a/ui/src/components/ai-chat/index.vue +++ b/ui/src/components/ai-chat/index.vue @@ -22,7 +22,8 @@ diff --git a/ui/src/views/log/index.vue b/ui/src/views/log/index.vue index 11aab4fa9..6d2e5b883 100644 --- a/ui/src/views/log/index.vue +++ b/ui/src/views/log/index.vue @@ -62,7 +62,7 @@ - +