arabellastrange commited on
Commit
cdd3710
·
1 Parent(s): e0208d1

editing conversation history use

Browse files
Files changed (1) hide show
  1. generate_response.py +2 -1
generate_response.py CHANGED
@@ -49,7 +49,8 @@ def generate_query_response(index, message):
49
  query_engine = index.as_query_engine(streaming=True, chat_mode=ChatMode.CONDENSE_QUESTION)
50
 
51
  logger.info(f'Input user message: {message}')
52
- response = query_engine.query(f"Write a comprehensive but concise response to this query: \n '{message}'")
 
53
 
54
  response_text = []
55
  for text in response.response_gen:
 
49
  query_engine = index.as_query_engine(streaming=True, chat_mode=ChatMode.CONDENSE_QUESTION)
50
 
51
  logger.info(f'Input user message: {message}')
52
+ response = query_engine.query(f"Write a comprehensive but concise response to this query, if conversation history "
53
+ f"is irrelevant to this query, ignore conversation histroy: \n '{message}'")
54
 
55
  response_text = []
56
  for text in response.response_gen: