KeenWoo commited on
Commit
43288cf
·
verified ·
1 Parent(s): 5a20464

Update alz_companion/agent.py

Browse files
Files changed (1) hide show
  1. alz_companion/agent.py +3 -1
alz_companion/agent.py CHANGED
@@ -674,7 +674,9 @@ def make_rag_chain(vs_general: FAISS, vs_personal: FAISS, *, for_evaluation: boo
674
  text_extensions = ('.txt', '.jsonl') # Define what counts as a text source
675
  for doc in all_personal_docs:
676
  source = doc.metadata.get("source", "").lower()
677
- if source.endswith(text_extensions):
 
 
678
  text_based_docs.append(doc)
679
 
680
  # 3. Extend the final list with only the filtered, text-based documents
 
674
  text_extensions = ('.txt', '.jsonl') # Define what counts as a text source
675
  for doc in all_personal_docs:
676
  source = doc.metadata.get("source", "").lower()
677
+ # if source.endswith(text_extensions):
678
+ # NEW: Include saved personal conversations
679
+ if source.endswith(text_extensions) or source == "saved chat":
680
  text_based_docs.append(doc)
681
 
682
  # 3. Extend the final list with only the filtered, text-based documents