Add conversation history to naive_query prompt
This commit is contained in:
@@ -1534,9 +1534,16 @@ async def naive_query(
|
||||
if query_param.only_need_context:
|
||||
return section
|
||||
|
||||
# Process conversation history
|
||||
history_context = ""
|
||||
if query_param.conversation_history:
|
||||
history_context = get_conversation_turns(
|
||||
query_param.conversation_history, query_param.history_turns
|
||||
)
|
||||
|
||||
sys_prompt_temp = PROMPTS["naive_rag_response"]
|
||||
sys_prompt = sys_prompt_temp.format(
|
||||
content_data=section, response_type=query_param.response_type
|
||||
content_data=section, response_type=query_param.response_type, history=history_context
|
||||
)
|
||||
|
||||
if query_param.only_need_prompt:
|
||||
|
Reference in New Issue
Block a user