Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Hi, I was trying to read .md file format using Langchain library DirectoryLoader.
Here's the code.
import dataiku
import os
from langchain.document_loaders import DirectoryLoader
FILE_NAME = "alice_in_wonderland.md"
# Load the file and split it into smaller chunks
docs_folder = dataiku.Folder("file1") # Replace with your input folder id
file_path = os.path.join(docs_folder.get_path(),
FILE_NAME)
loader = DirectoryLoader(file_path)
doc = loader.load()
can you help?
Operating system used: Almalinux (8.9)
The error is pretty clear, the package expects a directory path not a file path. Try passing a directory.