mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-05 19:11:52 +00:00
feat: add GraphRAG framework and integrate TuGraph (#1506)
Co-authored-by: KingSkyLi <15566300566@163.com> Co-authored-by: aries_ckt <916701291@qq.com> Co-authored-by: Fangyin Cheng <staneyffer@gmail.com>
This commit is contained in:
@@ -25,6 +25,7 @@ import {
|
||||
DocumentParams,
|
||||
IArguments,
|
||||
IChunkList,
|
||||
GraphVisResult,
|
||||
IChunkStrategyResponse,
|
||||
IDocumentResponse,
|
||||
ISpace,
|
||||
@@ -143,6 +144,9 @@ export const getSpaceList = () => {
|
||||
export const getDocumentList = (spaceName: string, data: Record<string, number | Array<number>>) => {
|
||||
return POST<Record<string, number | Array<number>>, IDocumentResponse>(`/knowledge/${spaceName}/document/list`, data);
|
||||
};
|
||||
export const getGraphVis = (spaceName: string, data:{limit: number}) => {
|
||||
return POST<Record<string, number>, GraphVisResult>(`/knowledge/${spaceName}/graphvis`, data);
|
||||
}
|
||||
|
||||
export const addDocument = (knowledgeName: string, data: DocumentParams) => {
|
||||
return POST<DocumentParams, number>(`/knowledge/${knowledgeName}/document/add`, data);
|
||||
@@ -172,8 +176,8 @@ export const getChunkList = (spaceName: string, data: ChunkListParams) => {
|
||||
return POST<ChunkListParams, IChunkList>(`/knowledge/${spaceName}/chunk/list`, data);
|
||||
};
|
||||
|
||||
export const delDocument = (spaceName: string, data: Record<string, string>) => {
|
||||
return POST<Record<string, string>, null>(`/knowledge/${spaceName}/document/delete`, data);
|
||||
export const delDocument = (spaceName: string, data: Record<string, number>) => {
|
||||
return POST<Record<string, number>>(`/knowledge/${spaceName}/document/delete`, data);
|
||||
};
|
||||
|
||||
export const delSpace = (data: Record<string, string>) => {
|
||||
|
Reference in New Issue
Block a user