Skip to content

Commit

Permalink
fix: also ingest small articles
Browse files Browse the repository at this point in the history
  • Loading branch information
bojanrajh committed Oct 16, 2023
1 parent efc47fc commit c7e5283
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion web/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def ingest(collection) -> FaissMap:
docs = loader.load()

# Remove documents that are too short
docs = [doc for doc in docs if len(doc.page_content) > 500]
# docs = [doc for doc in docs if len(doc.page_content) > 500]

# add heading and id metadata
add_metadata_to_docs(docs, current_dir)
Expand Down
6 changes: 3 additions & 3 deletions web/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,13 @@ def post_ingest(
db = ingest(collection.collection)
except EmptyEmbeddings:
return {
"success": True,
"metadatas": []
"success": False,
"metadatas": [],
}

return {
"success": True,
"metadatas": db.stats["metadatas"]
"metadatas": db.stats["metadatas"],
}


Expand Down

0 comments on commit c7e5283

Please sign in to comment.