feat: Supports chatting with files/images #1880 (#1943)

### What problem does this PR solve?

feat: Supports chatting with files/images #1880

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-08-14 17:26:47 +08:00
committed by GitHub
parent 78ed8fe9a5
commit a3a5a9966f
17 changed files with 487 additions and 37 deletions

View File

@ -207,12 +207,13 @@ export const useFetchChunk = (chunkId?: string): ResponseType<any> => {
return data;
};
export const useFetchKnowledgeGraph = (): ResponseType<any> => {
const { documentId } = useGetKnowledgeSearchParams();
export const useFetchKnowledgeGraph = (
documentId: string,
): ResponseType<any> => {
const { data } = useQuery({
queryKey: ['fetchKnowledgeGraph', documentId],
initialData: true,
enabled: !!documentId,
gcTime: 0,
queryFn: async () => {
const data = await kbService.knowledge_graph({