源码:
from langchain_community.document_loaders import DirectoryLoader
def load_documents(directory="book"):
loader = DirectoryLoader(directory, show_progress=True)
documents = loader.load()
for document in documents:
print(document)
load_documents()
报错信息:
File "C:\Users\xx\miniconda3\envs\chatglm\lib\site-packages\langchain_community\document_loaders\pebblo.py", line 5, in
import pwd
ModuleNotFoundError: No module named 'pwd'
谢谢老哥的解答了,给老哥磕一个