Fix history_context handling error in kg_query
This commit is contained in:
@@ -633,11 +633,8 @@ async def kg_query(
|
||||
# Process conversation history
|
||||
history_context = ""
|
||||
if query_param.conversation_history:
|
||||
recent_history = query_param.conversation_history[
|
||||
-query_param.history_window_size :
|
||||
]
|
||||
history_context = "\n".join(
|
||||
[f"{turn['role']}: {turn['content']}" for turn in recent_history]
|
||||
history_context = get_conversation_turns(
|
||||
query_param.conversation_history, query_param.history_turns
|
||||
)
|
||||
|
||||
sys_prompt_temp = PROMPTS["rag_response"]
|
||||
|
Reference in New Issue
Block a user