Skip to content

Commit

Permalink
fix: empty document
Browse files Browse the repository at this point in the history
  • Loading branch information
datvodinh committed May 13, 2024
1 parent 1ea9fc4 commit d513919
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rag_chatbot/core/ingestion/ingestion.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def store_nodes(
input_files=[input_file],
filename_as_id=True
).load_data()

document = [doc for doc in document if doc.text.strip()]
for doc in document:
doc.metadata['file_name'] = file_name
doc.text = re.sub(r'\s+', ' ', doc.text.strip())
Expand Down

0 comments on commit d513919

Please sign in to comment.