Skip to content

Commit

Permalink
refactor: Add document loaders and update constants
Browse files Browse the repository at this point in the history
Signed-off-by: teleprint-me <[email protected]>
  • Loading branch information
teleprint-me committed Jun 4, 2023
1 parent 3d1806d commit 672e34f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion constants.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import os

# from dotenv import load_dotenv
from chromadb.config import Settings
from langchain.document_loaders import CSVLoader, PDFMinerLoader, TextLoader

# load_dotenv()
ROOT_DIRECTORY = os.path.dirname(os.path.realpath(__file__))
Expand All @@ -15,4 +17,10 @@
chroma_db_impl='duckdb+parquet',
persist_directory=PERSIST_DIRECTORY,
anonymized_telemetry=False
)
)

DOCUMENT_MAP = {
".txt": TextLoader,
".pdf": PDFMinerLoader,
".csv": CSVLoader,
}

0 comments on commit 672e34f

Please sign in to comment.