fix entity extract

This commit is contained in:
LarFii
2024-12-04 16:01:19 +08:00
parent 3e69b326ec
commit be72c825d2

View File

@@ -296,7 +296,9 @@ async def extract_entities(
chunk_key = chunk_key_dp[0] chunk_key = chunk_key_dp[0]
chunk_dp = chunk_key_dp[1] chunk_dp = chunk_key_dp[1]
content = chunk_dp["content"] 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) final_result = await use_llm_func(hint_prompt)
history = pack_user_ass_to_openai_messages(hint_prompt, final_result) history = pack_user_ass_to_openai_messages(hint_prompt, final_result)
for now_glean_index in range(entity_extract_max_gleaning): for now_glean_index in range(entity_extract_max_gleaning):