mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-11 18:01:26 +08:00
Go knowledge compiler with scheduler-driven dataset compilation (#17913)
Ports dataset knowledge compilation (wiki/graph/tree/mindmap) to the Go scheduler with a status contract, aligns wiki storage/retrieval with Python, sizes prompts by content_length, and resolves embedding batch size from provider capability.
This commit is contained in:
@@ -10,7 +10,7 @@ import {
|
||||
} from '@/interfaces/request/knowledge';
|
||||
import api from '@/utils/api';
|
||||
import nextRequest from '@/utils/next-request';
|
||||
import registerServer from '@/utils/register-server';
|
||||
import registerServer, { registerNextServer } from '@/utils/register-server';
|
||||
import request from '@/utils/request';
|
||||
|
||||
const {
|
||||
@@ -287,6 +287,20 @@ export const runIndex = (datasetId: string, indexType: string) =>
|
||||
export const traceIndex = (datasetId: string, indexType: string) =>
|
||||
request.get(api.traceIndex(datasetId, indexType));
|
||||
|
||||
// getDatasetCompilationStatus reads the Go scheduler compile-status contract
|
||||
// (GET /datasets/:id/compilation/status), used by API_PROXY_SCHEME=go/hybrid to
|
||||
// replace the legacy traceIndex task-progress endpoint. Route it through the
|
||||
// service-layer proxy (registerNextServer -> next-request) like the rest of the
|
||||
// *-service.ts HTTP proxies.
|
||||
const compilationStatusProxy = registerNextServer({
|
||||
getDatasetCompilationStatus: {
|
||||
url: (datasetId: string) => api.compilationStatus(datasetId),
|
||||
method: 'get',
|
||||
},
|
||||
} as const);
|
||||
export const getDatasetCompilationStatus = (datasetId: string) =>
|
||||
compilationStatusProxy.getDatasetCompilationStatus(datasetId);
|
||||
|
||||
// Using RESTful API: GET /api/v1/datasets/{dataset_id}/documents
|
||||
export const listDocument = (
|
||||
params?: IFetchKnowledgeListRequestParams,
|
||||
|
||||
Reference in New Issue
Block a user