yangdx
commited on
Commit
·
b56bb94
1
Parent(s):
71b1e2e
Fix history_context handling error in kg_query
Browse files- lightrag/operate.py +2 -5
lightrag/operate.py
CHANGED
@@ -633,11 +633,8 @@ async def kg_query(
|
|
633 |
# Process conversation history
|
634 |
history_context = ""
|
635 |
if query_param.conversation_history:
|
636 |
-
|
637 |
-
|
638 |
-
]
|
639 |
-
history_context = "\n".join(
|
640 |
-
[f"{turn['role']}: {turn['content']}" for turn in recent_history]
|
641 |
)
|
642 |
|
643 |
sys_prompt_temp = PROMPTS["rag_response"]
|
|
|
633 |
# Process conversation history
|
634 |
history_context = ""
|
635 |
if query_param.conversation_history:
|
636 |
+
history_context = get_conversation_turns(
|
637 |
+
query_param.conversation_history, query_param.history_turns
|
|
|
|
|
|
|
638 |
)
|
639 |
|
640 |
sys_prompt_temp = PROMPTS["rag_response"]
|