md5sum
def md5sum(
filepath
):Perform an MD5 hash of a file.
Takes a file path and returns an ISO datetime string of last-modified and create date of file.
Returns tuple of the form (create-date, last-modify-date)
Extracts file extension (including dot) from file path
Call self as a function.
Extract tables from PDF and append to end of supplied Document list. Accepts either a filepath or a list of LangChain Document objects all from a single file. If filepath is empty, the file path of interest is extracted from docs.
Returns an updated list of Document objects appended with extracted tables.
Returns True if content of supplied Document includes a table caption
Check mimetype for plain text
Extract mimetype. Returns a tuple with extracted mimetype, type, subtype.
Interface for splitting text into chunks.
Extract file metadata
Sets Document metadata defaults
Create document with required metadata keys from METADATA.
Create dictinoary from LangChain Document
Create LangChain Document from dicationary