VietCat commited on
Commit
372caf9
·
1 Parent(s): b8c8892

update message flow

Browse files
Files changed (1) hide show
  1. app/message_processor.py +3 -3
app/message_processor.py CHANGED
@@ -208,10 +208,10 @@ class MessageProcessor:
208
  keywords_used = row.get('originalaction', '').strip()
209
 
210
  if user_text:
211
- context_lines.append(f"Người dùng: {user_text} (từ khóa đã dùng: {keywords_used})")
212
 
213
  if assistant_text:
214
- context_lines.append(f"Trợ lý: {assistant_text}")
215
 
216
  return "\n".join(context_lines)
217
 
@@ -252,7 +252,7 @@ class MessageProcessor:
252
  return sep.join([str(x) for x in arr if x not in (None, "")]) if isinstance(arr, list) else str(arr)
253
 
254
  for i, match in enumerate(matches, 1):
255
- full_result_text += f"\n* Nguồn: {(match.get('structure') or '').strip()}:\n"
256
  fullContent = (match.get('fullcontent') or '').strip()
257
  full_result_text += f"{fullContent}"
258
  hpbsnoidung = arr_to_str(match.get('hpbsnoidung'), sep="; ")
 
208
  keywords_used = row.get('originalaction', '').strip()
209
 
210
  if user_text:
211
+ context_lines.append(f"##Người dùng##: {user_text} (từ khóa đã dùng: {keywords_used})")
212
 
213
  if assistant_text:
214
+ context_lines.append(f"##Trợ lý##: {assistant_text}")
215
 
216
  return "\n".join(context_lines)
217
 
 
252
  return sep.join([str(x) for x in arr if x not in (None, "")]) if isinstance(arr, list) else str(arr)
253
 
254
  for i, match in enumerate(matches, 1):
255
+ full_result_text += f"\n\n* Nguồn: {(match.get('structure') or '').strip()}:\n"
256
  fullContent = (match.get('fullcontent') or '').strip()
257
  full_result_text += f"{fullContent}"
258
  hpbsnoidung = arr_to_str(match.get('hpbsnoidung'), sep="; ")