LangChain으로 LLM 애플리케이션 개발하기
Jonathan Bennion
AI Engineer & LangChain Contributor


.pdf, .csv.ipynb, .wav
pypdf 패키지 설치 필요: pip install pypdffrom langchain_community.document_loaders import PyPDFLoaderloader = PyPDFLoader("path/to/file/attention_is_all_you_need.pdf")data = loader.load()print(data[0])
Document(page_content='Provided proper attribution is provided, Google hereby grants
permission to\nreproduce the tables and figures in this paper solely for use in [...]
from langchain_community.document_loaders.csv_loader import CSVLoaderloader = CSVLoader('fifa_countries_audience.csv')data = loader.load()print(data[0])
Document(page_content='country: United States\nconfederation: CONCACAF\npopulation_share: [...]
unstructured 패키지 설치 필요: pip install unstructuredfrom langchain_community.document_loaders import UnstructuredHTMLLoaderloader = UnstructuredHTMLLoader("white_house_executive_order_nov_2023.html") data = loader.load()print(data[0])print(data[0].metadata)
page_content="To search this site, enter a search term\n\nSearch\n\nExecutive Order on the Safe, Secure, and Trustworthy Development and Use of Artificial Intelligence\n\nHome\n\nBriefing Room\n\nPresidential Actions\n\nBy the authority vested in me as President by the Constitution and the laws of the United States of America, it is hereby ordered as follows: ..."{'source': 'white_house_executive_order_nov_2023.html'}
LangChain으로 LLM 애플리케이션 개발하기