mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-18 05:37:24 +08:00
Refactor: migrate document run api (#14351)
### What problem does this PR solve? Before migration: POST /v1/document/run After migration: POST /api/v1/documents/ingest/ ### Type of change - [x] Refactoring
This commit is contained in:
@@ -301,7 +301,7 @@ export const useRunDocument = () => {
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: [DocumentApiAction.FetchDocumentList],
|
||||
});
|
||||
const ret = await kbService.documentRun({
|
||||
const ret = await kbService.documentIngest({
|
||||
doc_ids: documentIds,
|
||||
run,
|
||||
...(option || {}),
|
||||
|
||||
@@ -19,7 +19,7 @@ const {
|
||||
documentChangeParser,
|
||||
documentThumbnails,
|
||||
retrievalTest,
|
||||
documentRun,
|
||||
documentIngest,
|
||||
documentUpload,
|
||||
webCrawl,
|
||||
knowledgeGraph,
|
||||
@@ -47,8 +47,8 @@ const methods = {
|
||||
url: documentChangeStatus,
|
||||
method: 'post',
|
||||
},
|
||||
documentRun: {
|
||||
url: documentRun,
|
||||
documentIngest: {
|
||||
url: documentIngest,
|
||||
method: 'post',
|
||||
},
|
||||
documentChangeParser: {
|
||||
|
||||
@@ -119,9 +119,9 @@ export default {
|
||||
`${restAPIv1}/datasets/${datasetId}/documents`,
|
||||
documentRename: (datasetId: string, documentId: string) =>
|
||||
`${restAPIv1}/datasets/${datasetId}/documents/${documentId}`,
|
||||
documentIngest: `${restAPIv1}/documents/ingest`,
|
||||
documentCreate: (datasetId: string) =>
|
||||
`${restAPIv1}/datasets/${datasetId}/documents?type=empty`,
|
||||
documentRun: `${webAPI}/document/run`,
|
||||
documentChangeParser: `${webAPI}/document/change_parser`,
|
||||
documentThumbnails: `${webAPI}/document/thumbnails`,
|
||||
getDocumentFile: `${webAPI}/document/get`,
|
||||
|
||||
Reference in New Issue
Block a user