이 노트북은 복사하여 붙여넣기한 내용에서 document 객체를 로드하는 방법을 다룹니다. 이 경우 DocumentLoader를 사용할 필요 없이 Document를 직접 생성할 수 있습니다.
from langchain_core.documents import Document
text = "..... put the text you copy pasted here......"
doc = Document(page_content=text)

Metadata

텍스트를 가져온 출처에 대한 metadata를 추가하려면 metadata key를 사용하여 쉽게 추가할 수 있습니다.
metadata = {"source": "internet", "date": "Friday"}
doc = Document(page_content=text, metadata=metadata)

Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.
I