RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
add callback to entity extraction (#1843)
Kevin Hua199572bf8ea
diff --git a/graphrag/index.py b/graphrag/index.pyindex a2914c19f5..cdc77fb98d 100644--- a/graphrag/index.py+++ b/graphrag/index.py@@ -86,13 +86,15 @@ def build_knowlege_graph_chunks(tenant_id: str, chunks: List[str], callback, entfor i in range(len(chunks)):tkn_cnt = num_tokens_from_string(chunks[i])if cnt+tkn_cnt >= left_token_count and texts:- threads.append(exe.submit(ext, texts, {"entity_types": entity_types}, callback))+ for b in range(0, len(texts), 16):+ threads.append(exe.submit(ext, ["\n".join(texts[b:b+16])], {"entity_types": entity_types}, callback))texts = []cnt = 0texts.append(chunks[i])cnt += tkn_cntif texts:- threads.append(exe.submit(ext, texts))+ for b in range(0, len(texts), 16):+ threads.append(exe.submit(ext, ["\n".join(texts[b:b+16])], {"entity_types": entity_types}, callback))callback(0.5, "Extracting entities.")graphs = []