mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? feat: Add KnowledgeGraphModal #162 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -206,3 +206,22 @@ export const useFetchChunk = (chunkId?: string): ResponseType<any> => {
|
||||
|
||||
return data;
|
||||
};
|
||||
|
||||
export const useFetchKnowledgeGraph = (): ResponseType<any> => {
|
||||
const { documentId } = useGetKnowledgeSearchParams();
|
||||
|
||||
const { data } = useQuery({
|
||||
queryKey: ['fetchKnowledgeGraph', documentId],
|
||||
initialData: true,
|
||||
gcTime: 0,
|
||||
queryFn: async () => {
|
||||
const data = await kbService.knowledge_graph({
|
||||
doc_id: documentId,
|
||||
});
|
||||
|
||||
return data;
|
||||
},
|
||||
});
|
||||
|
||||
return data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user