compass.scripts.download.load_known_docs#

async load_known_docs(jurisdiction, fps, local_file_loader_kwargs=None)[source]#

Load documents from known local paths

Parameters:
  • jurisdiction (Jurisdiction) – Jurisdiction instance representing the jurisdiction corresponding to the documents.

  • fps (Iterable of path-like) – Collection of paths to load documents from.

  • local_file_loader_kwargs (dict, optional) – Dictionary of keyword arguments pairs to initialize AsyncLocalFileLoader (for “elm” file loader backend) or AsyncLocalDoclingFileLoader (for “docling” file loader backend). By default, None.

Returns:

out_docs (list) – List of BaseDocument instances containing documents from the paths, or an empty list if something went wrong during the retrieval process.

Notes

Requires TempFileCachePB service to be running.