arabellastrange commited on
Commit
00af1a2
1 Parent(s): 986fbe3

editing conversation history use

Browse files
Files changed (1) hide show
  1. generate_response.py +4 -2
generate_response.py CHANGED
@@ -76,7 +76,8 @@ def generate_chat_response_with_history(message, history):
76
 
77
  def generate_chat_response_with_history_rag_return_response(index, message, history):
78
  logger.info("Generating chat response with history and rag...")
79
- message = f"Write a comprehensive but concise response to this query: \n '{message}'"
 
80
  messages = collect_history(message, history)
81
 
82
  logger.info("Creating query engine with index...")
@@ -86,7 +87,8 @@ def generate_chat_response_with_history_rag_return_response(index, message, hist
86
 
87
  def generate_chat_response_with_history_rag_yield_string(index, message, history):
88
  logger.info("Generating chat response with history and rag...")
89
- message = f"Write a comprehensive but concise response to this query: \n '{message}'"
 
90
 
91
  string_output = ""
92
 
 
76
 
77
  def generate_chat_response_with_history_rag_return_response(index, message, history):
78
  logger.info("Generating chat response with history and rag...")
79
+ message = (f"Write a comprehensive but concise response to this query, if conversation history is irrelevant to "
80
+ f"this query, ignore conversation history: \n '{message}'")
81
  messages = collect_history(message, history)
82
 
83
  logger.info("Creating query engine with index...")
 
87
 
88
  def generate_chat_response_with_history_rag_yield_string(index, message, history):
89
  logger.info("Generating chat response with history and rag...")
90
+ message = (f"Write a comprehensive but concise response to this query, if conversation history is irrelevant to "
91
+ f"this query, ignore conversation history: \n '{message}'")
92
 
93
  string_output = ""
94