From be72c825d2214af7810618fc0fa42f60a3a4f303 Mon Sep 17 00:00:00 2001 From: LarFii <834462287@qq.com> Date: Wed, 4 Dec 2024 16:01:19 +0800 Subject: [PATCH] fix entity extract --- lightrag/operate.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lightrag/operate.py b/lightrag/operate.py index a40af9e0..09585e50 100644 --- a/lightrag/operate.py +++ b/lightrag/operate.py @@ -296,7 +296,9 @@ async def extract_entities( chunk_key = chunk_key_dp[0] chunk_dp = chunk_key_dp[1] content = chunk_dp["content"] - hint_prompt = entity_extract_prompt.format(**context_base, input_text=content) + # hint_prompt = entity_extract_prompt.format(**context_base, input_text=content) + hint_prompt = entity_extract_prompt.format(**context_base, input_text="{input_text}").format(**context_base, input_text=content) + final_result = await use_llm_func(hint_prompt) history = pack_user_ass_to_openai_messages(hint_prompt, final_result) for now_glean_index in range(entity_extract_max_gleaning):