id stringlengths 14 16 | source stringlengths 49 117 | text stringlengths 16 2.73k |
|---|---|---|
ed5cc3d28a2c-11 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/twitter.html | 15]}], 'urls': []}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': 1648134341678051328, 'in_reply_to_status_id_str': '1648134341678051328', 'in_reply_to_user_id': 2835451658, 'in_reply_to_user_id_str': '2835451658', 'in_reply_to_screen_name': 'Mr... |
ed5cc3d28a2c-12 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/twitter.html | 'default_profile_image': False, 'following': None, 'follow_request_sent': None, 'notifications': None, 'translator_type': 'none', 'withheld_in_countries': []}}), |
ed5cc3d28a2c-13 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/twitter.html | Document(page_content='@TRHLofficial What’s he talking about and why is it sponsored by Erik’s son?', metadata={'created_at': 'Tue Apr 18 03:32:17 +0000 2023', 'user_info': {'id': 44196397, 'id_str': '44196397', 'name': 'Elon Musk', 'screen_name': 'elonmusk', 'location': 'A Shortfall of Gravitas', 'profile_location': N... |
ed5cc3d28a2c-14 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/twitter.html | 'indices': [11, 15]}], 'urls': []}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': 1648134341678051328, 'in_reply_to_status_id_str': '1648134341678051328', 'in_reply_to_user_id': 2835451658, 'in_reply_to_user_id_str': '2835451658', 'in_reply_to_s... |
ed5cc3d28a2c-15 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/twitter.html | False, 'default_profile_image': False, 'following': None, 'follow_request_sent': None, 'notifications': None, 'translator_type': 'none', 'withheld_in_countries': []}})] |
ed5cc3d28a2c-16 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/twitter.html | previous
2Markdown
next
Text Splitters
By Harrison Chase
© Copyright 2023, Harrison Chase.
Last updated on Jun 04, 2023. |
df7c67d6e847-0 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/html.html | .ipynb
.pdf
HTML
Contents
Loading HTML with BeautifulSoup4
HTML#
The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser.
This covers how to load HTML documents into a document format that we can use downstream.
from langchain.document_loaders impo... |
4f9bfe4e6d6d-0 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/confluence.html | .ipynb
.pdf
Confluence
Contents
Confluence
Examples
Username and Password or Username and API Token (Atlassian Cloud only)
Personal Access Token (Server/On-Prem only)
Confluence#
Confluence is a wiki collaboration platform that saves and organizes all of the project-related material. Confluence is a knowledge base th... |
4f9bfe4e6d6d-1 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/confluence.html | By default the code will return up to 1000 documents in 50 documents batches. To control the total number of documents use the max_pages parameter.
Plese note the maximum value for the limit parameter in the atlassian-python-api package is currently 100.
from langchain.document_loaders import ConfluenceLoader
loader = ... |
e3a04a67db8b-0 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/gutenberg.html | .ipynb
.pdf
Gutenberg
Gutenberg#
Project Gutenberg is an online library of free eBooks.
This notebook covers how to load links to Gutenberg e-books into a document format that we can use downstream.
from langchain.document_loaders import GutenbergLoader
loader = GutenbergLoader('https://www.gutenberg.org/cache/epub/699... |
8ba9c1a4130f-0 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/email.html | .ipynb
.pdf
Email
Contents
Using Unstructured
Retain Elements
Using OutlookMessageLoader
Email#
This notebook shows how to load email (.eml) or Microsoft Outlook (.msg) files.
Using Unstructured#
#!pip install unstructured
from langchain.document_loaders import UnstructuredEmailLoader
loader = UnstructuredEmailLoader... |
8ba9c1a4130f-1 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/email.html | previous
CSV
next
EPub
Contents
Using Unstructured
Retain Elements
Using OutlookMessageLoader
By Harrison Chase
© Copyright 2023, Harrison Chase.
Last updated on Jun 04, 2023. |
16f6cc8c8a38-0 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/json.html | .ipynb
.pdf
JSON
Contents
Using JSONLoader
Extracting metadata
The metadata_func
Common JSON structures with jq schema
JSON#
JSON (JavaScript Object Notation) is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pair... |
16f6cc8c8a38-1 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/json.html | 'blue one!',
'sender_name': 'User 1',
'timestamp_ms': 1675595109305},
{'content': 'Here is $129',
'sender_name': 'User 2',
'timestamp_ms': 1675595068468},
{'photos': [{'creation_timestamp': 1675595059,
'ur... |
16f6cc8c8a38-2 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/json.html | jq_schema='.messages[].content')
data = loader.load()
pprint(data)
[Document(page_content='Bye!', metadata={'source': '/Users/avsolatorio/WBG/langchain/docs/modules/indexes/document_loaders/examples/example_data/facebook_chat.json', 'seq_num': 1}),
Document(page_content='Oh no worries! Bye', metadata={'source': '/User... |
16f6cc8c8a38-3 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/json.html | Document(page_content='Online is at least $100', metadata={'source': '/Users/avsolatorio/WBG/langchain/docs/modules/indexes/document_loaders/examples/example_data/facebook_chat.json', 'seq_num': 8}),
Document(page_content='How much do you want?', metadata={'source': '/Users/avsolatorio/WBG/langchain/docs/modules/index... |
16f6cc8c8a38-4 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/json.html | Additionally, we now have to explicitly specify in the loader, via the content_key argument, the key from the record where the value for the page_content needs to be extracted from.
# Define the metadata extraction function.
def metadata_func(record: dict, metadata: dict) -> dict:
metadata["sender_name"] = record.g... |
16f6cc8c8a38-5 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/json.html | Document(page_content='I thought you were selling the blue one!', metadata={'source': '/Users/avsolatorio/WBG/langchain/docs/modules/indexes/document_loaders/examples/example_data/facebook_chat.json', 'seq_num': 4, 'sender_name': 'User 1', 'timestamp_ms': 1675595140251}),
Document(page_content='Im not interested in th... |
16f6cc8c8a38-6 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/json.html | Document(page_content='How much do you want?', metadata={'source': '/Users/avsolatorio/WBG/langchain/docs/modules/indexes/document_loaders/examples/example_data/facebook_chat.json', 'seq_num': 9, 'sender_name': 'User 1', 'timestamp_ms': 1675594799696}),
Document(page_content='Goodmorning! $50 is too low.', metadata={'... |
16f6cc8c8a38-7 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/json.html | metadata["timestamp_ms"] = record.get("timestamp_ms")
if "source" in metadata:
source = metadata["source"].split("/")
source = source[source.index("langchain"):]
metadata["source"] = "/".join(source)
return metadata
loader = JSONLoader(
file_path='./example_data/facebook_chat.js... |
16f6cc8c8a38-8 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/json.html | Document(page_content='Im not interested in this bag. Im interested in the blue one!', metadata={'source': 'langchain/docs/modules/indexes/document_loaders/examples/example_data/facebook_chat.json', 'seq_num': 5, 'sender_name': 'User 1', 'timestamp_ms': 1675595109305}),
Document(page_content='Here is $129', metadata={... |
16f6cc8c8a38-9 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/json.html | Document(page_content='Hi! Im interested in your bag. Im offering $50. Let me know if you are interested. Thanks!', metadata={'source': 'langchain/docs/modules/indexes/document_loaders/examples/example_data/facebook_chat.json', 'seq_num': 11, 'sender_name': 'User 1', 'timestamp_ms': 1675549022673})]
Common JSON structu... |
7fa7437b2c0c-0 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/sitemap.html | .ipynb
.pdf
Sitemap
Contents
Filtering sitemap URLs
Local Sitemap
Sitemap#
Extends from the WebBaseLoader, SitemapLoader loads a sitemap from a given URL, and then scrape and load all pages in the sitemap, returning each page as a Document.
The scraping is done concurrently. There are reasonable limits to concurrent... |
7fa7437b2c0c-1 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/sitemap.html | Document(page_content='\n\n\n\n\n\nWelcome to LangChain — 🦜🔗 LangChain 0.0.123\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nSkip to main content\n\n\n\n\n\n\n\n\n\n\nCtrl+K\n\n\n\n\n\n\n\n\n\n\n\n\n🦜🔗 LangChain 0.0.123\n\n\n\nGetting Started\n\nQuickstart Guide\n\nMod... |
7fa7437b2c0c-2 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/sitemap.html | Loader\nEmail\nEverNote\nFacebook Chat\nFigma\nGCS Directory\nGCS File Storage\nGitBook\nGoogle Drive\nGutenberg\nHacker News\nHTML\niFixit\nImages\nIMSDb\nMarkdown\nNotebook\nNotion\nObsidian\nPDF\nPowerPoint\nReadTheDocs Documentation\nRoam\ns3 Directory\ns3 File\nSubtitle Files\nTelegram\nUnstructured File Loader\nU... |
7fa7437b2c0c-3 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/sitemap.html | Math\nLLMRequestsChain\nLLMSummarizationCheckerChain\nModeration\nPAL\nSQLite example\n\n\nAsync API for Chain\n\n\nKey Concepts\nReference\n\n\nAgents\nGetting Started\nKey Concepts\nHow-To Guides\nAgents and Vectorstores\nAsync API for Agent\nConversation Agent (for Chat Models)\nChatGPT Plugins\nCustom Agent\nDefini... |
7fa7437b2c0c-4 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/sitemap.html | Answering Benchmarking: State of the Union Address\nQA Generation\nQuestion Answering\nSQL Question Answering Benchmarking: Chinook\n\n\nModel Comparison\n\nReference\n\nInstallation\nIntegrations\nAPI References\nPrompts\nPromptTemplates\nExample Selector\n\n\nUtilities\nPython REPL\nSerpAPI\nSearxNG Search\nDocstore\... |
7fa7437b2c0c-5 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/sitemap.html | enabling\ndevelopers to build applications that they previously could not.\nBut using these LLMs in isolation is often not enough to\ncreate a truly powerful app - the real power comes when you are able to\ncombine them with other sources of computation or knowledge.\nThis library is aimed at assisting in the developme... |
7fa7437b2c0c-6 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/sitemap.html | and end-to-end chains for common applications.\nIndexes: Language models are often more powerful when combined with your own text data - this module covers best practices for doing exactly that.\nAgents: Agents involve an LLM making decisions about which Actions to take, taking that Action, seeing an Observation, and r... |
7fa7437b2c0c-7 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/sitemap.html | Generation.\nQuerying Tabular Data: If you want to understand how to use LLMs to query data that is stored in a tabular format (csvs, SQL, dataframes, etc) you should read this page.\nEvaluation: Generative models are notoriously hard to evaluate with traditional metrics. One new way of evaluating them is using languag... |
7fa7437b2c0c-8 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/sitemap.html | agents.\nProduction Support: As you move your LangChains into production, we’d love to offer more comprehensive support. Please fill out this form and we’ll set up a dedicated support Slack channel.\n\n\n\n\n\n\n\n\n\n\n\nnext\nQuickstart Guide\n\n\n\n\n\n\n\n\n\n Contents\n \n\n\nGetting Started\nModules\nUse Cases\n... |
7fa7437b2c0c-9 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/sitemap.html | Filtering sitemap URLs#
Sitemaps can be massive files, with thousands of URLs. Often you don’t need every single one of them. You can filter the URLs by passing a list of strings or regex patterns to the url_filter parameter. Only URLs that match one of the patterns will be loaded.
loader = SitemapLoader(
"https... |
7fa7437b2c0c-10 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/sitemap.html | Document(page_content='\n\n\n\n\n\nWelcome to LangChain — 🦜🔗 LangChain 0.0.123\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nSkip to main content\n\n\n\n\n\n\n\n\n\n\nCtrl+K\n\n\n\n\n\n\n\n\n\n\n\n\n🦜🔗 LangChain 0.0.123\n\n\n\nGetting Started\n\nQuickstart Guide\n\nMod... |
7fa7437b2c0c-11 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/sitemap.html | Hosted Embeddings\nTensorflowHub\n\n\n\n\nPrompts\nPrompt Templates\nGetting Started\nHow-To Guides\nHow to create a custom prompt template\nHow to create a prompt template that uses few shot examples\nHow to work with partial Prompt Templates\nHow to serialize prompts\n\n\nReference\nPromptTemplates\nExample Selector\... |
7fa7437b2c0c-12 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/sitemap.html | Lake\nElasticSearch\nFAISS\nMilvus\nOpenSearch\nPGVector\nPinecone\nQdrant\nRedis\nWeaviate\n\n\nRetrievers\nChatGPT Plugin Retriever\nVectorStore Retriever\n\n\n\n\nMemory\nGetting Started\nHow-To Guides\nConversationBufferMemory\nConversationBufferWindowMemory\nEntity Memory\nConversation Knowledge Graph Memory\nConv... |
7fa7437b2c0c-13 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/sitemap.html | Agent\nMRKL\nMRKL Chat\nReAct\nSelf Ask With Search\n\n\nToolkits\nCSV Agent\nJSON Agent\nOpenAPI Agent\nPandas Dataframe Agent\nPython Agent\nSQL Database Agent\nVectorstore Agent\n\n\nAgent Executors\nHow to combine agents and vectorstores\nHow to use the async API for Agents\nHow to create ChatGPT Clone\nHow to acce... |
7fa7437b2c0c-14 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/sitemap.html | Search API\nSerpAPI\nStochasticAI\nUnstructured\nWeights & Biases\nWeaviate\nWolfram Alpha Wrapper\nWriter\n\n\n\nAdditional Resources\n\nLangChainHub\nGlossary\nLangChain Gallery\nDeployments\nTracing\nDiscord\nProduction Support\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.rst\n\n... |
7fa7437b2c0c-15 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/sitemap.html | supports.\nPrompts: This includes prompt management, prompt optimization, and prompt serialization.\nMemory: Memory is the concept of persisting state between calls of a chain/agent. LangChain provides a standard interface for memory, a collection of memory implementations, and examples of chains/agents that use memory... |
7fa7437b2c0c-16 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/sitemap.html | information and allow them to take actions.\nExtraction: Extract structured information from text.\nSummarization: Summarizing longer documents into shorter, more condensed chunks of information. A type of Data Augmented Generation.\nEvaluation: Generative models are notoriously hard to evaluate with traditional metric... |
7fa7437b2c0c-17 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/sitemap.html | channel.\n\n\n\n\n\n\n\n\n\n\n\nnext\nQuickstart Guide\n\n\n\n\n\n\n\n\n\n Contents\n \n\n\nGetting Started\nModules\nUse Cases\nReference Docs\nLangChain Ecosystem\nAdditional Resources\n\n\n\n\n\n\n\n\n\nBy Harrison Chase\n\n\n\n\n \n © Copyright 2023, Harrison Chase.\n \n\n\n\n\n Last updated on Mar 2... |
7fa7437b2c0c-18 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/sitemap.html | Local Sitemap#
The sitemap loader can also be used to load local files.
sitemap_loader = SitemapLoader(web_path="example_data/sitemap.xml", is_local=True)
docs = sitemap_loader.load()
Fetching pages: 100%|###################################################################################################################... |
6f60cc868ea0-0 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pyspark_dataframe.html | .ipynb
.pdf
PySpark DataFrame Loader
PySpark DataFrame Loader#
This notebook goes over how to load data from a PySpark DataFrame.
#!pip install pyspark
from pyspark.sql import SparkSession
spark = SparkSession.builder.getOrCreate()
Setting default log level to "WARN".
To adjust logging level use sc.setLogLevel(newLevel... |
6f60cc868ea0-1 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pyspark_dataframe.html | Document(page_content='Athletics', metadata={' "Payroll (millions)"': ' 55.37', ' "Wins"': ' 94'}),
Document(page_content='Rangers', metadata={' "Payroll (millions)"': ' 120.51', ' "Wins"': ' 93'}),
Document(page_content='Orioles', metadata={' "Payroll (millions)"': ' 81.43', ' "Wins"': ' 93'}),
Docum... |
6f60cc868ea0-2 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pyspark_dataframe.html | Document(page_content='Diamondbacks', metadata={' "Payroll (millions)"': ' 74.28', ' "Wins"': ' 81'}),
Document(page_content='Pirates', metadata={' "Payroll (millions)"': ' 63.43', ' "Wins"': ' 79'}),
Document(page_content='Padres', metadata={' "Payroll (millions)"': ' 55.24', ' "Wins"': ' 76'}),
Docum... |
6f60cc868ea0-3 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pyspark_dataframe.html | Document(page_content='Rockies', metadata={' "Payroll (millions)"': ' 78.06', ' "Wins"': ' 64'}),
Document(page_content='Cubs', metadata={' "Payroll (millions)"': ' 88.19', ' "Wins"': ' 61'}),
Document(page_content='Astros', metadata={' "Payroll (millions)"': ' 60.65', ' "Wins"': ' 55'})]
previo... |
d13e9427581d-0 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/aws_s3_file.html | .ipynb
.pdf
AWS S3 File
AWS S3 File#
Amazon Simple Storage Service (Amazon S3) is an object storage service.
AWS S3 Buckets
This covers how to load document objects from an AWS S3 File object.
from langchain.document_loaders import S3FileLoader
#!pip install boto3
loader = S3FileLoader("testing-hwc", "fake.docx")
loade... |
79a5a4c84cbe-0 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | .ipynb
.pdf
WebBaseLoader
Contents
Loading multiple webpages
Load multiple urls concurrently
Loading a xml file, or using a different BeautifulSoup parser
WebBaseLoader#
This covers how to use WebBaseLoader to load all text from HTML webpages into a document format that we can use downstream. For more custom logic fo... |
79a5a4c84cbe-1 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | [Document(page_content="\n\n\n\n\n\n\n\n\nESPN - Serving Sports Fans. Anytime. Anywhere.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n Skip to main content\n \n\n ... |
79a5a4c84cbe-2 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | Mock Draft 3.0\n\n\nQuick Links\n\n\n\n\nMen's Tournament Challenge\n\n\n\n\n\n\n\nWomen's Tournament Challenge\n\n\n\n\n\n\n\nNFL Draft Order\n\n\n\n\n\n\n\nHow To Watch NHL Games\n\n\n\n\n\n\n\nFantasy Baseball: Sign Up\n\n\n\n\n\n\n\nHow To Watch PGA TOUR\n\n\n\n\n\n\nFavorites\n\n\n\n\n\n\n Manage Favorites\n ... |
79a5a4c84cbe-3 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | not optionLove to leave North Carolina, enter transfer portalBelichick to angsty Pats fans: See last 25 yearsEmbiid out, Harden due back vs. Jokic, NuggetsLynch: Purdy 'earned the right' to start for NinersMan Utd, Wrexham plan July friendly in San DiegoOn paper, Padres overtake DodgersLAMAR WANTS OUT OF BALTIMOREMarcu... |
79a5a4c84cbe-4 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | BASKETBALLWhy AD needs to be more assertive with LeBron on the court10h1:33Why Perk won't blame Kyrie for Mavs' woes8h1:48WHERE EVERY TEAM STANDSNew NFL Power Rankings: Post-free-agency 1-32 poll, plus underrated offseason movesThe free agent frenzy has come and gone. Which teams have improved their 2023 outlook, and w... |
79a5a4c84cbe-5 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | of ESPN+AP Photo/Lynne SladkyFantasy Baseball ESPN+ Cheat Sheet: Sleepers, busts, rookies and closersYou've read their names all preseason long, it'd be a shame to forget them on draft day. The ESPN+ Cheat Sheet is one way to make sure that doesn't happen.Steph Chambers/Getty ImagesPassan's 2023 MLB season preview: Bol... |
79a5a4c84cbe-6 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | Tour, Masters, PGA Championship and FedEx Cup playoffs on ESPN and ESPN+.Hailie Lynch/XFLHow to watch the XFL: 2023 schedule, teams, players, news, moreEvery XFL game will be streamed on ESPN+. Find out when and where else you can watch the eight teams compete. Sign up to play the #1 Fantasy Baseball GameReactivate A L... |
79a5a4c84cbe-7 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | Network\n\n\nESPN Apps\n\n\n\n\nESPN\n\n\n\n\n\n\n\nESPN Fantasy\n\n\nFollow ESPN\n\n\n\n\nFacebook\n\n\n\n\n\n\n\nTwitter\n\n\n\n\n\n\n\nInstagram\n\n\n\n\n\n\n\nSnapchat\n\n\n\n\n\n\n\nYouTube\n\n\n\n\n\n\n\nThe ESPN Daily Podcast\n\n\nTerms of UsePrivacy PolicyYour US State Privacy RightsChildren's Online Privacy Po... |
79a5a4c84cbe-8 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | """
# Use this piece of code for testing new custom BeautifulSoup parsers
import requests
from bs4 import BeautifulSoup
html_doc = requests.get("{INSERT_NEW_URL_HERE}")
soup = BeautifulSoup(html_doc.text, 'html.parser')
# Beautiful soup logic to be exported to langchain.document_loaders.webpage.py
# Example: transcript... |
79a5a4c84cbe-9 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | [Document(page_content="\n\n\n\n\n\n\n\n\nESPN - Serving Sports Fans. Anytime. Anywhere.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n Skip to main content\n \n\n ... |
79a5a4c84cbe-10 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | Mock Draft 3.0\n\n\nQuick Links\n\n\n\n\nMen's Tournament Challenge\n\n\n\n\n\n\n\nWomen's Tournament Challenge\n\n\n\n\n\n\n\nNFL Draft Order\n\n\n\n\n\n\n\nHow To Watch NHL Games\n\n\n\n\n\n\n\nFantasy Baseball: Sign Up\n\n\n\n\n\n\n\nHow To Watch PGA TOUR\n\n\n\n\n\n\nFavorites\n\n\n\n\n\n\n Manage Favorites\n ... |
79a5a4c84cbe-11 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | not optionLove to leave North Carolina, enter transfer portalBelichick to angsty Pats fans: See last 25 yearsEmbiid out, Harden due back vs. Jokic, NuggetsLynch: Purdy 'earned the right' to start for NinersMan Utd, Wrexham plan July friendly in San DiegoOn paper, Padres overtake DodgersLAMAR WANTS OUT OF BALTIMOREMarcu... |
79a5a4c84cbe-12 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | BASKETBALLWhy AD needs to be more assertive with LeBron on the court9h1:33Why Perk won't blame Kyrie for Mavs' woes8h1:48WHERE EVERY TEAM STANDSNew NFL Power Rankings: Post-free-agency 1-32 poll, plus underrated offseason movesThe free agent frenzy has come and gone. Which teams have improved their 2023 outlook, and wh... |
79a5a4c84cbe-13 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | of ESPN+AP Photo/Lynne SladkyFantasy Baseball ESPN+ Cheat Sheet: Sleepers, busts, rookies and closersYou've read their names all preseason long, it'd be a shame to forget them on draft day. The ESPN+ Cheat Sheet is one way to make sure that doesn't happen.Steph Chambers/Getty ImagesPassan's 2023 MLB season preview: Bol... |
79a5a4c84cbe-14 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | Tour, Masters, PGA Championship and FedEx Cup playoffs on ESPN and ESPN+.Hailie Lynch/XFLHow to watch the XFL: 2023 schedule, teams, players, news, moreEvery XFL game will be streamed on ESPN+. Find out when and where else you can watch the eight teams compete. Sign up to play the #1 Fantasy Baseball GameReactivate A L... |
79a5a4c84cbe-15 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | Network\n\n\nESPN Apps\n\n\n\n\nESPN\n\n\n\n\n\n\n\nESPN Fantasy\n\n\nFollow ESPN\n\n\n\n\nFacebook\n\n\n\n\n\n\n\nTwitter\n\n\n\n\n\n\n\nInstagram\n\n\n\n\n\n\n\nSnapchat\n\n\n\n\n\n\n\nYouTube\n\n\n\n\n\n\n\nThe ESPN Daily Podcast\n\n\nTerms of UsePrivacy PolicyYour US State Privacy RightsChildren's Online Privacy Po... |
79a5a4c84cbe-16 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | Document(page_content='GoogleSearch Images Maps Play YouTube News Gmail Drive More »Web History | Settings | Sign in\xa0Advanced searchAdvertisingBusiness SolutionsAbout Google© 2023 - Privacy - Terms ', lookup_str='', metadata={'source': 'https://google.com'}, lookup_index=0)]
Load multiple urls concurrently#
You ca... |
79a5a4c84cbe-17 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | [Document(page_content="\n\n\n\n\n\n\n\n\nESPN - Serving Sports Fans. Anytime. Anywhere.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n Skip to main content\n \n\n ... |
79a5a4c84cbe-18 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | Mock Draft 3.0\n\n\nQuick Links\n\n\n\n\nMen's Tournament Challenge\n\n\n\n\n\n\n\nWomen's Tournament Challenge\n\n\n\n\n\n\n\nNFL Draft Order\n\n\n\n\n\n\n\nHow To Watch NHL Games\n\n\n\n\n\n\n\nFantasy Baseball: Sign Up\n\n\n\n\n\n\n\nHow To Watch PGA TOUR\n\n\n\n\n\n\nFavorites\n\n\n\n\n\n\n Manage Favorites\n ... |
79a5a4c84cbe-19 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | not optionLove to leave North Carolina, enter transfer portalBelichick to angsty Pats fans: See last 25 yearsEmbiid out, Harden due back vs. Jokic, NuggetsLynch: Purdy 'earned the right' to start for NinersMan Utd, Wrexham plan July friendly in San DiegoOn paper, Padres overtake DodgersLAMAR WANTS OUT OF BALTIMOREMarcu... |
79a5a4c84cbe-20 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | BASKETBALLWhy AD needs to be more assertive with LeBron on the court9h1:33Why Perk won't blame Kyrie for Mavs' woes8h1:48WHERE EVERY TEAM STANDSNew NFL Power Rankings: Post-free-agency 1-32 poll, plus underrated offseason movesThe free agent frenzy has come and gone. Which teams have improved their 2023 outlook, and wh... |
79a5a4c84cbe-21 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | of ESPN+AP Photo/Lynne SladkyFantasy Baseball ESPN+ Cheat Sheet: Sleepers, busts, rookies and closersYou've read their names all preseason long, it'd be a shame to forget them on draft day. The ESPN+ Cheat Sheet is one way to make sure that doesn't happen.Steph Chambers/Getty ImagesPassan's 2023 MLB season preview: Bol... |
79a5a4c84cbe-22 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | Tour, Masters, PGA Championship and FedEx Cup playoffs on ESPN and ESPN+.Hailie Lynch/XFLHow to watch the XFL: 2023 schedule, teams, players, news, moreEvery XFL game will be streamed on ESPN+. Find out when and where else you can watch the eight teams compete. Sign up to play the #1 Fantasy Baseball GameReactivate A L... |
79a5a4c84cbe-23 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | Network\n\n\nESPN Apps\n\n\n\n\nESPN\n\n\n\n\n\n\n\nESPN Fantasy\n\n\nFollow ESPN\n\n\n\n\nFacebook\n\n\n\n\n\n\n\nTwitter\n\n\n\n\n\n\n\nInstagram\n\n\n\n\n\n\n\nSnapchat\n\n\n\n\n\n\n\nYouTube\n\n\n\n\n\n\n\nThe ESPN Daily Podcast\n\n\nTerms of UsePrivacy PolicyYour US State Privacy RightsChildren's Online Privacy Po... |
79a5a4c84cbe-24 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | Document(page_content='GoogleSearch Images Maps Play YouTube News Gmail Drive More »Web History | Settings | Sign in\xa0Advanced searchAdvertisingBusiness SolutionsAbout Google© 2023 - Privacy - Terms ', lookup_str='', metadata={'source': 'https://google.com'}, lookup_index=0)]
Loading a xml file, or using a differen... |
79a5a4c84cbe-25 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | [Document(page_content='\n\n10\nEnergy\n3\n2018-01-01\n2018-01-01\nfalse\nUniform test method for the measurement of energy efficiency of commercial packaged boilers.\n§ 431.86\nSection § 431.86\n\nEnergy\nDEPARTMENT OF ENERGY\nENERGY CONSERVATION\nENERGY EFFICIENCY PROGRAM FOR CERTAIN COMMERCIAL AND INDUSTRIAL EQUIP... |
79a5a4c84cbe-26 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | Water\nOil-fired\n>2,500,000\nCombustion Efficiency\nAppendix A, Section 3.\n\n\nSteam\nGas-fired (all*)\n≥300,000 and ≤2,500,000\nThermal Efficiency\nAppendix A, Section 2.\n\n\nSteam\nGas-fired (all*)\n>2,500,000 and ≤5,000,000\nThermal Efficiency\nAppendix A, Section 2.\n\n\n\u2003\n\n>5,000,000\nThermal Efficiency\... |
79a5a4c84cbe-27 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | 'https://www.govinfo.gov/content/pkg/CFR-2018-title10-vol3/xml/CFR-2018-title10-vol3-sec431-86.xml'}, lookup_index=0)] |
79a5a4c84cbe-28 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html | previous
URL
next
Weather
Contents
Loading multiple webpages
Load multiple urls concurrently
Loading a xml file, or using a different BeautifulSoup parser
By Harrison Chase
© Copyright 2023, Harrison Chase.
Last updated on Jun 04, 2023. |
f8eeea304dfd-0 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/wikipedia.html | .ipynb
.pdf
Wikipedia
Contents
Installation
Examples
Wikipedia#
Wikipedia is a multilingual free online encyclopedia written and maintained by a community of volunteers, known as Wikipedians, through open collaboration and using a wiki-based editing system called MediaWiki. Wikipedia is the largest and most-read refe... |
b972387e695c-0 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/iugu.html | .ipynb
.pdf
Iugu
Iugu#
Iugu is a Brazilian services and software as a service (SaaS) company. It offers payment-processing software and application programming interfaces for e-commerce websites and mobile applications.
This notebook covers how to load data from the Iugu REST API into a format that can be ingested into... |
da2cd363d067-0 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/copypaste.html | .ipynb
.pdf
Copy Paste
Contents
Metadata
Copy Paste#
This notebook covers how to load a document object from something you just want to copy and paste. In this case, you don’t even need to use a DocumentLoader, but rather can just construct the Document directly.
from langchain.docstore.document import Document
text ... |
c933e4fba1ea-0 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/weather.html | .ipynb
.pdf
Weather
Weather#
OpenWeatherMap is an open source weather service provider
This loader fetches the weather data from the OpenWeatherMap’s OneCall API, using the pyowm Python package. You must initialize the loader with your OpenWeatherMap API token and the names of the cities you want the weather data for.
... |
163ebcb5a76f-0 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/url.html | .ipynb
.pdf
URL
Contents
URL
Selenium URL Loader
Setup
Playwright URL Loader
Setup
URL#
This covers how to load HTML documents from a list of URLs into a document format that we can use downstream.
from langchain.document_loaders import UnstructuredURLLoader
urls = [
"https://www.understandingwar.org/backgrounde... |
163ebcb5a76f-1 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/url.html | from langchain.document_loaders import PlaywrightURLLoader
urls = [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"https://goo.gl/maps/NDSHwePEyaHMFGwh8"
]
loader = PlaywrightURLLoader(urls=urls, remove_selectors=["header", "footer"])
data = loader.load()
previous
Unstructured File
next
WebBaseLoader
Contents... |
dcaedc089dc3-0 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/imsdb.html | .ipynb
.pdf
IMSDb
IMSDb#
IMSDb is the Internet Movie Script Database.
This covers how to load IMSDb webpages into a document format that we can use downstream.
from langchain.document_loaders import IMSDbLoader
loader = IMSDbLoader("https://imsdb.com/scripts/BlacKkKlansman.html")
data = loader.load()
data[0].page_conte... |
0ccad496ed26-0 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/file_directory.html | .ipynb
.pdf
File Directory
Contents
Show a progress bar
Use multithreading
Change loader class
Auto detect file encodings with TextLoader
A. Default Behavior
B. Silent fail
C. Auto detect encodings
File Directory#
This covers how to use the DirectoryLoader to load all documents in a directory. Under the hood, by defa... |
0ccad496ed26-1 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/file_directory.html | len(docs)
1
If you need to load Python source code files, use the PythonLoader.
from langchain.document_loaders import PythonLoader
loader = DirectoryLoader('../../../../../', glob="**/*.py", loader_cls=PythonLoader)
docs = loader.load()
len(docs)
691
Auto detect file encodings with TextLoader#
In this example we will ... |
0ccad496ed26-2 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/file_directory.html | │ 319 │ def decode(self, input, final=False): │
│ 320 │ │ # decode input (taking the buffer into account) │
│ 321 │ │ data = self.buffer + input │
│ ❱ 322 │ │ ... |
0ccad496ed26-3 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/file_directory.html | │ 85 │ │ │ │ │ finally: │
│ 86 │ │ │ │ │ │ if pbar: │
│ 87 │ │ │ │ │ │ │ pbar.update(1) │
│ ... |
0ccad496ed26-4 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/file_directory.html | │ 45 │ │ │ except Exception as e: │
│ 46 │ │ │ │ raise RuntimeError(f"Error loading {self.file_path}") from e │
│ 47 │
╰────────────────... |
0ccad496ed26-5 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/file_directory.html | '../../../../../tests/integration_tests/examples/example-utf8.txt']
previous
Facebook Chat
next
HTML
Contents
Show a progress bar
Use multithreading
Change loader class
Auto detect file encodings with TextLoader
A. Default Behavior
B. Silent fail
C. Auto detect encodings
By Harrison Chase
© Copyright 202... |
2a0345422587-0 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/google_drive.html | .ipynb
.pdf
Google Drive
Contents
Prerequisites
🧑 Instructions for ingesting your Google Docs data
Google Drive#
Google Drive is a file storage and synchronization service developed by Google.
This notebook covers how to load documents from Google Drive. Currently, only Google Docs are supported.
Prerequisites#
Crea... |
2a0345422587-1 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/google_drive.html | folder_id="1yucgL9WGgWZdM1TOuKkeghlPizuzMYb5",
# Optional: configure whether to recursively fetch files from subfolders. Defaults to False.
recursive=False
)
docs = loader.load()
When you pass a folder_id by default all files of type document, sheet and pdf are loaded. You can modify this behaviour by passing a... |
87f55911f2f0-0 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/trello.html | .ipynb
.pdf
Trello
Contents
Features
Trello#
Trello is a web-based project management and collaboration tool that allows individuals and teams to organize and track their tasks and projects. It provides a visual interface known as a “board” where users can create lists and cards to represent their tasks and activitie... |
87f55911f2f0-1 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/trello.html | ········
········
from langchain.document_loaders import TrelloLoader
# Get the open cards from "Awesome Board"
loader = TrelloLoader.from_credentials(
"Awesome Board",
api_key=API_KEY,
token=TOKEN,
card_filter="open",
)
documents = loader.load()
print(documents[0].page_content)
print(documents[0].m... |
87f55911f2f0-2 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/trello.html | include_checklist= False,
include_comments= False,
)
documents = loader.load()
print("Document: " + documents[0].page_content)
print(documents[0].metadata)
Contents
Features
By Harrison Chase
© Copyright 2023, Harrison Chase.
Last updated on Jun 04, 2023. |
603dabfb35d3-0 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html | .ipynb
.pdf
PDF
Contents
Using PyPDF
Using MathPix
Using Unstructured
Retain Elements
Fetching remote PDFs using Unstructured
Using PyPDFium2
Using PDFMiner
Using PDFMiner to generate HTML text
Using PyMuPDF
PyPDF Directory
Using pdfplumber
PDF#
Portable Document Format (PDF), standardized as ISO 32000, is a file for... |
603dabfb35d3-1 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html | Document(page_content='LayoutParser : A Uni\x0ced Toolkit for Deep\nLearning Based Document Image Analysis\nZejiang Shen1( \x00), Ruochen Zhang2, Melissa Dell3, Benjamin Charles Germain\nLee4, Jacob Carlson3, and Weining Li5\n1Allen Institute for AI\nshannons@allenai.org\n2Brown University\nruochen zhang@brown.edu\n3Ha... |
603dabfb35d3-2 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html | pipelines. We demonstrate that LayoutParser is helpful for both\nlightweight and large-scale digitization pipelines in real-word use cases.\nThe library is publicly available at https://layout-parser.github.io .\nKeywords: Document Image Analysis ·Deep Learning ·Layout Analysis\n·Character Recognition ·Open Source libr... |
603dabfb35d3-3 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html | An advantage of this approach is that documents can be retrieved with page numbers.
We want to use OpenAIEmbeddings so we have to get the OpenAI API Key.
import os
import getpass
os.environ['OPENAI_API_KEY'] = getpass.getpass('OpenAI API Key:')
OpenAI API Key: ········
from langchain.vectorstores import FAISS
from lang... |
603dabfb35d3-4 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html | Using Unstructured#
from langchain.document_loaders import UnstructuredPDFLoader
loader = UnstructuredPDFLoader("example_data/layout-parser-paper.pdf")
data = loader.load()
Retain Elements#
Under the hood, Unstructured creates different “elements” for different chunks of text. By default we combine those together, but ... |
603dabfb35d3-5 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html | Document(page_content='LayoutParser: A Unified Toolkit for Deep\nLearning Based Document Image Analysis\nZejiang Shen1 (�), Ruochen Zhang2, Melissa Dell3, Benjamin Charles Germain\nLee4, Jacob Carlson3, and Weining Li5\n1 Allen Institute for AI\nshannons@allenai.org\n2 Brown University\nruochen zhang@brown.edu\n3 Harvar... |
603dabfb35d3-6 | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pdf.html | LayoutParser is helpful for both\nlightweight and large-scale digitization pipelines in real-word use cases.\nThe library is publicly available at https://layout-parser.github.io.\nKeywords: Document Image Analysis · Deep Learning · Layout Analysis\n· Character Recognition · Open Source library · Toolkit.\n1\nIntroduct... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.