LarFii commited on
Commit
206e98f
·
1 Parent(s): 49483c5

fix entity extract

Browse files
Files changed (1) hide show
  1. lightrag/operate.py +3 -1
lightrag/operate.py CHANGED
@@ -296,7 +296,9 @@ async def extract_entities(
296
  chunk_key = chunk_key_dp[0]
297
  chunk_dp = chunk_key_dp[1]
298
  content = chunk_dp["content"]
299
- hint_prompt = entity_extract_prompt.format(**context_base, input_text=content)
 
 
300
  final_result = await use_llm_func(hint_prompt)
301
  history = pack_user_ass_to_openai_messages(hint_prompt, final_result)
302
  for now_glean_index in range(entity_extract_max_gleaning):
 
296
  chunk_key = chunk_key_dp[0]
297
  chunk_dp = chunk_key_dp[1]
298
  content = chunk_dp["content"]
299
+ # hint_prompt = entity_extract_prompt.format(**context_base, input_text=content)
300
+ hint_prompt = entity_extract_prompt.format(**context_base, input_text="{input_text}").format(**context_base, input_text=content)
301
+
302
  final_result = await use_llm_func(hint_prompt)
303
  history = pack_user_ass_to_openai_messages(hint_prompt, final_result)
304
  for now_glean_index in range(entity_extract_max_gleaning):