Python
使用 LangChain Python 集成复制粘贴文档加载器。
from langchain_core.documents import Document
text = "..... put the text you copy pasted here......"
doc = Document(page_content=text)
metadata = {"source": "internet", "date": "Friday"}
doc = Document(page_content=text, metadata=metadata)