id
stringlengths
14
16
text
stringlengths
36
2.73k
source
stringlengths
49
117
40ba3d7d7368-7
below. I took it off and it stopped. I ordered more protectors from amazon and replaced it\n\n\n\n### Other Answer\niPhone 6 Plus first generationโ€ฆ.I had the same issues as all above, apps opening by themselves, self typing, ultra sensitive screen, items jumping around all overโ€ฆ.it even called someone on FaceTime twice by itself when I was not in the roomโ€ฆ..I thought the phone was toast and iโ€™d have to buy a new one took me a while to figure out but it was the extra cheap block plug I bought at a dollar store for convenience of an extra charging station when I move around the house from den to living roomโ€ฆ..cord was fine but bought a new Apple brand block plugโ€ฆno more problems works just fine now. This issue was a recent event so had to narrow things down to what had changed recently to my phone so I could figure it out.\nI even had the same problem on a laptop with documents opening up by themselvesโ€ฆ..a laptop that was plugged in to the same wall plug as my phone charger with the dollar store block plugโ€ฆ.until I changed the block plug.\n\n\n\n### Other Answer\nHad the problem: Inherited a 6s Plus from my wife. She had no problem with it.\nLooks like it was merely the cheap phone case I purchased on Amazon. It was either pinching the edges or torquing the screen/body of the phone. Problem solved.\n\n\n\n### Other Answer\nI bought my phone on march 6 and it was a brand new, but It sucks me uo because it freezing, shaking and control by itself. I went to the store where I bought this and I told them to replacr it, but they told me I have to pay it because Its about lcd issue. Please help me what other ways to fix it. Or should I try to remove the screen or should I follow your step above.\n\n\n\n### Other
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/ifixit.html
40ba3d7d7368-8
I try to remove the screen or should I follow your step above.\n\n\n\n### Other Answer\nI tried everything and it seems to come back to needing the original iPhone cableโ€ฆor at least another 1 that would have come with another iPhoneโ€ฆnot the $5 Store fast charging cables. My original cable is pretty beat up - like most that I see - but Iโ€™ve been beaten up much MUCH less by sticking with its use! I didnโ€™t find that the casing/shell around it or not made any diff.\n\n\n\n### Other Answer\ngreat now I have to wait one more hour to reset my phone and while I was tryin to connect my phone to my computer the computer also restarted smh does anyone else knows how I can get my phone to workโ€ฆ my problem is I have a black dot on the bottom left of my screen an it wont allow me to touch a certain part of my screen unless I rotate my phone and I know the password but the first number is a 2 and it won\'t let me touch 1,2, or 3 so now I have to find a way to get rid of my password and all of a sudden my phone wants to touch stuff on its own which got my phone disabled many times to the point where I have to wait a whole hour and I really need to finish something on my phone today PLEASE HELPPPP\n\n\n\n### Other Answer\nIn my case , iphone 6 screen was faulty. I got it replaced at local repair shop, so far phone is working fine.\n\n\n\n### Other Answer\nthis problem in iphone 6 has many different scenarios and solutions, first try to reconnect the lcd screen to the motherboard again, if didnt solve, try to replace the lcd connector on the motherboard, if not solved, then remains two issues, lcd screen it self or touch IC. in my country some repair shops just change them all for almost 40$
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/ifixit.html
40ba3d7d7368-9
self or touch IC. in my country some repair shops just change them all for almost 40$ since they dont want to troubleshoot one by one. readers of this comment also should know that partial screen not responding in other iphone models might also have an issue in LCD connector on the motherboard, specially if you lock/unlock screen and screen works again for sometime. lcd connectors gets disconnected lightly from the motherboard due to multiple falls and hits after sometime. best of luck for all\n\n\n\n### Other Answer\nI am facing the same issue whereby these ghost touches type and open apps , I am using an original Iphone cable , how to I fix this issue.\n\n\n\n### Other Answer\nThere were two issues with the phone I had troubles with. It was my dads and turns out he carried it in his pocket. The phone itself had a little bend in it as a result. A little pressure in the opposite direction helped the issue. But it also had a tiny crack in the screen which wasnt obvious, once we added a screen protector this fixed the issues entirely.\n\n\n\n### Other Answer\nI had the same problem with my 64Gb iPhone 6+. Tried a lot of things and eventually downloaded all my images and videos to my PC and restarted the phone - problem solved. Been working now for two days.', lookup_str='', metadata={'source': 'https://www.ifixit.com/Answers/View/318583/My+iPhone+6+is+typing+and+opening+apps+by+itself', 'title': 'My iPhone 6 is typing and opening apps by itself'}, lookup_index=0)]
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/ifixit.html
40ba3d7d7368-10
loader = IFixitLoader("https://www.ifixit.com/Device/Standard_iPad") data = loader.load() data [Document(page_content="Standard iPad\nThe standard edition of the tablet computer made by Apple.\n== Background Information ==\n\nOriginally introduced in January 2010, the iPad is Apple's standard edition of their tablet computer. In total, there have been ten generations of the standard edition of the iPad.\n\n== Additional Information ==\n\n* [link|https://www.apple.com/ipad-select/|Official Apple Product Page]\n* [link|https://en.wikipedia.org/wiki/IPad#iPad|Official iPad Wikipedia]", lookup_str='', metadata={'source': 'https://www.ifixit.com/Device/Standard_iPad', 'title': 'Standard iPad'}, lookup_index=0)] Searching iFixit using /suggest# If youโ€™re looking for a more general way to search iFixit based on a keyword or phrase, the /suggest endpoint will return content related to the search term, then the loader will load the content from each of the suggested items and prep and return the documents. data = IFixitLoader.load_suggestions("Banana") data
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/ifixit.html
40ba3d7d7368-11
data = IFixitLoader.load_suggestions("Banana") data [Document(page_content='Banana\nTasty fruit. Good source of potassium. Yellow.\n== Background Information ==\n\nCommonly misspelled, this wildly popular, phone shaped fruit serves as nutrition and an obstacle to slow down vehicles racing close behind you. Also used commonly as a synonym for โ€œcrazyโ€ or โ€œinsaneโ€.\n\nBotanically, the banana is considered a berry, although it isnโ€™t included in the culinary berry category containing strawberries and raspberries. Belonging to the genus Musa, the banana originated in Southeast Asia and Australia. Now largely cultivated throughout South and Central America, bananas are largely available throughout the world. They are especially valued as a staple food group in developing countries due to the banana treeโ€™s ability to produce fruit year round.\n\nThe banana can be easily opened. Simply remove the outer yellow shell by cracking the top of the stem. Then, with the broken piece, peel downward on each side until the fruity components on the inside are exposed. Once the shell has been removed it cannot be put back together.\n\n== Technical Specifications ==\n\n* Dimensions: Variable depending on genetics of the parent tree\n* Color: Variable depending on ripeness, region, and season\n\n== Additional Information ==\n\n[link|https://en.wikipedia.org/wiki/Banana|Wiki: Banana]', lookup_str='', metadata={'source': 'https://www.ifixit.com/Device/Banana', 'title': 'Banana'}, lookup_index=0),
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/ifixit.html
40ba3d7d7368-12
Document(page_content="# Banana Teardown\nIn this teardown, we open a banana to see what's inside. Yellow and delicious, but most importantly, yellow.\n\n\n###Tools Required:\n\n - Fingers\n\n - Teeth\n\n - Thumbs\n\n\n###Parts Required:\n\n - None\n\n\n## Step 1\nTake one banana from the bunch.\nDon't squeeze too hard!\n\n\n## Step 2\nHold the banana in your left hand and grip the stem between your right thumb and forefinger.\n\n\n## Step 3\nPull the stem downward until the peel splits.\n\n\n## Step 4\nInsert your thumbs into the split of the peel and pull the two sides apart.\nExpose the top of the banana. It may be slightly squished from pulling on the stem, but this will not affect the flavor.\n\n\n## Step 5\nPull open the peel, starting from your original split, and opening it along the length of the banana.\n\n\n## Step 6\nRemove fruit from peel.\n\n\n## Step 7\nEat and enjoy!\nThis is where you'll need your teeth.\nDo not choke on banana!\n", lookup_str='', metadata={'source': 'https://www.ifixit.com/Teardown/Banana+Teardown/811', 'title': 'Banana Teardown'}, lookup_index=0)] previous HuggingFace dataset next IMSDb Contents Searching iFixit using /suggest By Harrison Chase ยฉ Copyright 2023, Harrison Chase. Last updated on Jun 11, 2023.
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/ifixit.html
3348e37f46a0-0
.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_content[:500] '\n\r\n\r\n\r\n\r\n BLACKKKLANSMAN\r\n \r\n \r\n \r\n \r\n Written by\r\n\r\n Charlie Wachtel & David Rabinowitz\r\n\r\n and\r\n\r\n Kevin Willmott & Spike Lee\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n FADE IN:\r\n \r\n SCENE FROM "GONE WITH' data[0].metadata {'source': 'https://imsdb.com/scripts/BlacKkKlansman.html'} previous iFixit next MediaWikiDump By Harrison Chase ยฉ Copyright 2023, Harrison Chase. Last updated on Jun 11, 2023.
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/imsdb.html
5d87c73a53e5-0
.ipynb .pdf Airtable Airtable# ! pip install pyairtable from langchain.document_loaders import AirtableLoader Get your API key here. Get ID of your base here. Get your table ID from the table url as shown here. api_key="xxx" base_id="xxx" table_id="xxx" loader = AirtableLoader(api_key,table_id,base_id) docs = loader.load() Returns each table row as dict. len(docs) 3 eval(docs[0].page_content) {'id': 'recF3GbGZCuh9sXIQ', 'createdTime': '2023-06-09T04:47:21.000Z', 'fields': {'Priority': 'High', 'Status': 'In progress', 'Name': 'Document Splitters'}} previous Document Loaders next OpenAIWhisperParser By Harrison Chase ยฉ Copyright 2023, Harrison Chase. Last updated on Jun 11, 2023.
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/airtable.html
1c5d8357e3f9-0
.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('example_data/fake-email.eml') data = loader.load() data [Document(page_content='This is a test email to use for unit tests.\n\nImportant points:\n\nRoses are red\n\nViolets are blue', metadata={'source': 'example_data/fake-email.eml'})] Retain Elements# Under the hood, Unstructured creates different โ€œelementsโ€ for different chunks of text. By default we combine those together, but you can easily keep that separation by specifying mode="elements". loader = UnstructuredEmailLoader('example_data/fake-email.eml', mode="elements") data = loader.load() data[0] Document(page_content='This is a test email to use for unit tests.', lookup_str='', metadata={'source': 'example_data/fake-email.eml'}, lookup_index=0) Using OutlookMessageLoader# #!pip install extract_msg from langchain.document_loaders import OutlookMessageLoader loader = OutlookMessageLoader('example_data/fake-email.msg') data = loader.load() data[0] Document(page_content='This is a test email to experiment with the MS Outlook MSG Extractor\r\n\r\n\r\n-- \r\n\r\n\r\nKind regards\r\n\r\n\r\n\r\n\r\nBrian Zhou\r\n\r\n', metadata={'subject': 'Test for TIF files', 'sender': 'Brian Zhou <brizhou@gmail.com>', 'date': 'Mon, 18 Nov 2013 16:26:24 +0800'})
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/email.html
1c5d8357e3f9-1
previous CSV next EPub Contents Using Unstructured Retain Elements Using OutlookMessageLoader By Harrison Chase ยฉ Copyright 2023, Harrison Chase. Last updated on Jun 11, 2023.
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/email.html
7c0a6b80cb9b-0
.ipynb .pdf Azure Blob Storage File Azure Blob Storage File# Azure Files offers fully managed file shares in the cloud that are accessible via the industry standard Server Message Block (SMB) protocol, Network File System (NFS) protocol, and Azure Files REST API. This covers how to load document objects from a Azure Files. #!pip install azure-storage-blob from langchain.document_loaders import AzureBlobStorageFileLoader loader = AzureBlobStorageFileLoader(conn_str='<connection string>', container='<container name>', blob_name='<blob name>') loader.load() [Document(page_content='Lorem ipsum dolor sit amet.', lookup_str='', metadata={'source': '/var/folders/y6/8_bzdg295ld6s1_97_12m4lr0000gn/T/tmpxvave6wl/fake.docx'}, lookup_index=0)] previous Azure Blob Storage Container next Blackboard By Harrison Chase ยฉ Copyright 2023, Harrison Chase. Last updated on Jun 11, 2023.
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/azure_blob_storage_file.html
f764976663a1-0
.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 default this uses the UnstructuredLoader from langchain.document_loaders import DirectoryLoader We can use the glob parameter to control which files to load. Note that here it doesnโ€™t load the .rst file or the .ipynb files. loader = DirectoryLoader('../', glob="**/*.md") docs = loader.load() len(docs) 1 Show a progress bar# By default a progress bar will not be shown. To show a progress bar, install the tqdm library (e.g. pip install tqdm), and set the show_progress parameter to True. %pip install tqdm loader = DirectoryLoader('../', glob="**/*.md", show_progress=True) docs = loader.load() Requirement already satisfied: tqdm in /Users/jon/.pyenv/versions/3.9.16/envs/microbiome-app/lib/python3.9/site-packages (4.65.0) 0it [00:00, ?it/s] Use multithreading# By default the loading happens in one thread. In order to utilize several threads set the use_multithreading flag to true. loader = DirectoryLoader('../', glob="**/*.md", use_multithreading=True) docs = loader.load() Change loader class# By default this uses the UnstructuredLoader class. However, you can change up the type of loader pretty easily. from langchain.document_loaders import TextLoader loader = DirectoryLoader('../', glob="**/*.md", loader_cls=TextLoader) docs = loader.load()
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/file_directory.html
f764976663a1-1
docs = loader.load() 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 see some strategies that can be useful when loading a big list of arbitrary files from a directory using the TextLoader class. First to illustrate the problem, letโ€™s try to load multiple text with arbitrary encodings. path = '../../../../../tests/integration_tests/examples' loader = DirectoryLoader(path, glob="**/*.txt", loader_cls=TextLoader) A. Default Behavior# loader.load() โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Traceback (most recent call last) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ /data/source/langchain/langchain/document_loaders/text.py:29 in load โ”‚ โ”‚ โ”‚ โ”‚ 26 โ”‚ โ”‚ text = "" โ”‚ โ”‚ 27 โ”‚ โ”‚ with open(self.file_path, encoding=self.encoding) as f: โ”‚ โ”‚ 28 โ”‚ โ”‚ โ”‚ try: โ”‚ โ”‚ โฑ 29 โ”‚ โ”‚ โ”‚ โ”‚ text = f.read() โ”‚ โ”‚ 30 โ”‚ โ”‚ โ”‚ except UnicodeDecodeError as e: โ”‚ โ”‚ 31 โ”‚ โ”‚ โ”‚ โ”‚ if self.autodetect_encoding: โ”‚ โ”‚ 32 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ detected_encodings = self.detect_file_encodings() โ”‚ โ”‚ โ”‚ โ”‚ /home/spike/.pyenv/versions/3.9.11/lib/python3.9/codecs.py:322 in decode โ”‚
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/file_directory.html
f764976663a1-2
โ”‚ โ”‚ โ”‚ 319 โ”‚ def decode(self, input, final=False): โ”‚ โ”‚ 320 โ”‚ โ”‚ # decode input (taking the buffer into account) โ”‚ โ”‚ 321 โ”‚ โ”‚ data = self.buffer + input โ”‚ โ”‚ โฑ 322 โ”‚ โ”‚ (result, consumed) = self._buffer_decode(data, self.errors, final) โ”‚ โ”‚ 323 โ”‚ โ”‚ # keep undecoded input until the next call โ”‚ โ”‚ 324 โ”‚ โ”‚ self.buffer = data[consumed:] โ”‚ โ”‚ 325 โ”‚ โ”‚ return result โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ UnicodeDecodeError: 'utf-8' codec can't decode byte 0xca in position 0: invalid continuation byte The above exception was the direct cause of the following exception: โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Traceback (most recent call last) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ in <module>:1 โ”‚ โ”‚ โ”‚ โ”‚ โฑ 1 loader.load() โ”‚ โ”‚ 2 โ”‚ โ”‚ โ”‚ โ”‚ /data/source/langchain/langchain/document_loaders/directory.py:84 in load โ”‚ โ”‚ โ”‚ โ”‚ 81 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ if self.silent_errors: โ”‚ โ”‚ 82 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ logger.warning(e) โ”‚ โ”‚ 83 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ else: โ”‚ โ”‚ โฑ 84 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ raise e โ”‚
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/file_directory.html
f764976663a1-3
โ”‚ 85 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ finally: โ”‚ โ”‚ 86 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ if pbar: โ”‚ โ”‚ 87 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ pbar.update(1) โ”‚ โ”‚ โ”‚ โ”‚ /data/source/langchain/langchain/document_loaders/directory.py:78 in load โ”‚ โ”‚ โ”‚ โ”‚ 75 โ”‚ โ”‚ โ”‚ if i.is_file(): โ”‚ โ”‚ 76 โ”‚ โ”‚ โ”‚ โ”‚ if _is_visible(i.relative_to(p)) or self.load_hidden: โ”‚ โ”‚ 77 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ try: โ”‚ โ”‚ โฑ 78 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ sub_docs = self.loader_cls(str(i), **self.loader_kwargs).load() โ”‚ โ”‚ 79 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ docs.extend(sub_docs) โ”‚ โ”‚ 80 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ except Exception as e: โ”‚ โ”‚ 81 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ if self.silent_errors: โ”‚ โ”‚ โ”‚ โ”‚ /data/source/langchain/langchain/document_loaders/text.py:44 in load โ”‚ โ”‚ โ”‚ โ”‚ 41 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ except UnicodeDecodeError: โ”‚ โ”‚ 42 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ continue โ”‚ โ”‚ 43 โ”‚ โ”‚ โ”‚ โ”‚ else: โ”‚ โ”‚ โฑ 44 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ raise RuntimeError(f"Error loading {self.file_path}") from e โ”‚
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/file_directory.html
f764976663a1-4
โ”‚ 45 โ”‚ โ”‚ โ”‚ except Exception as e: โ”‚ โ”‚ 46 โ”‚ โ”‚ โ”‚ โ”‚ raise RuntimeError(f"Error loading {self.file_path}") from e โ”‚ โ”‚ 47 โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ RuntimeError: Error loading ../../../../../tests/integration_tests/examples/example-non-utf8.txt The file example-non-utf8.txt uses a different encoding the load() function fails with a helpful message indicating which file failed decoding. With the default behavior of TextLoader any failure to load any of the documents will fail the whole loading process and no documents are loaded. B. Silent fail# We can pass the parameter silent_errors to the DirectoryLoader to skip the files which could not be loaded and continue the load process. loader = DirectoryLoader(path, glob="**/*.txt", loader_cls=TextLoader, silent_errors=True) docs = loader.load() Error loading ../../../../../tests/integration_tests/examples/example-non-utf8.txt doc_sources = [doc.metadata['source'] for doc in docs] doc_sources ['../../../../../tests/integration_tests/examples/whatsapp_chat.txt', '../../../../../tests/integration_tests/examples/example-utf8.txt'] C. Auto detect encodings# We can also ask TextLoader to auto detect the file encoding before failing, by passing the autodetect_encoding to the loader class. text_loader_kwargs={'autodetect_encoding': True} loader = DirectoryLoader(path, glob="**/*.txt", loader_cls=TextLoader, loader_kwargs=text_loader_kwargs) docs = loader.load() doc_sources = [doc.metadata['source'] for doc in docs] doc_sources ['../../../../../tests/integration_tests/examples/example-non-utf8.txt', '../../../../../tests/integration_tests/examples/whatsapp_chat.txt',
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/file_directory.html
f764976663a1-5
'../../../../../tests/integration_tests/examples/whatsapp_chat.txt', '../../../../../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 2023, Harrison Chase. Last updated on Jun 11, 2023.
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/file_directory.html
0a69dd533542-0
.ipynb .pdf College Confidential College Confidential# College Confidential gives information on 3,800+ colleges and universities. This covers how to load College Confidential webpages into a document format that we can use downstream. from langchain.document_loaders import CollegeConfidentialLoader loader = CollegeConfidentialLoader("https://www.collegeconfidential.com/colleges/brown-university/") data = loader.load() data
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/college_confidential.html
0a69dd533542-1
[Document(page_content='\n\n\n\n\n\n\n\nA68FEB02-9D19-447C-B8BC-818149FD6EAF\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n Media (2)\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nE45B8B13-33D4-450E-B7DB-F66EFE8F2097\n\n\n\n\n\n\n\n\n\nE45B8B13-33D4-450E-B7DB-F66EFE8F2097\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nAbout Brown\n\n\n\n\n\n\nBrown University Overview\nBrown University is a private, nonprofit school in the urban setting of Providence, Rhode Island. Brown was founded in 1764 and the school currently enrolls around 10,696 students a year, including 7,349 undergraduates. Brown provides on-campus housing for students. Most students live in off campus housing.\n๐Ÿ“† Mark your calendar! January 5, 2023 is the final deadline to submit an application for the Fall 2023 semester. \nThere are many ways for students to get involved at Brown! \nLove music or performing? Join a campus band, sing in a chorus, or perform with one of the school\'s theater groups.\nInterested in journalism or communications? Brown students can write for the campus newspaper, host a radio show or be a producer for the student-run television channel.\nInterested in joining a fraternity or sorority? Brown has fraternities and sororities.\nPlanning to play sports? Brown has
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/college_confidential.html
0a69dd533542-2
Brown has fraternities and sororities.\nPlanning to play sports? Brown has many options for athletes. See them all and learn more about life at Brown on the Student Life page.\n\n\n\n2022 Brown Facts At-A-Glance\n\n\n\n\n\nAcademic Calendar\nOther\n\n\nOverall Acceptance Rate\n6%\n\n\nEarly Decision Acceptance Rate\n16%\n\n\nEarly Action Acceptance Rate\nEA not offered\n\n\nApplicants Submitting SAT scores\n51%\n\n\nTuition\n$62,680\n\n\nPercent of Need Met\n100%\n\n\nAverage First-Year Financial Aid Package\n$59,749\n\n\n\n\nIs Brown a Good School?\n\nDifferent people have different ideas about what makes a "good" school. Some factors that can help you determine what a good school for you might be include admissions criteria, acceptance rate, tuition costs, and more.\nLet\'s take a look at these factors to get a clearer sense of what Brown offers and if it could be the right college for you.\nBrown Acceptance Rate 2022\nIt is extremely difficult to get into Brown. Around 6% of applicants get into Brown each year. In 2022, just 2,568 out of the 46,568 students who applied were accepted.\nRetention and Graduation Rates at Brown\nRetention refers to the number of students that stay enrolled at a school over time. This is a way to get a sense of how satisfied students are with their school experience, and if they have the support necessary to succeed in college. \nApproximately 98% of first-year, full-time undergrads who start at Browncome back their sophomore year. 95% of Brown undergrads graduate within six years. The average six-year graduation rate for U.S. colleges and universities is 61% for public schools, and 67% for
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/college_confidential.html
0a69dd533542-3
for U.S. colleges and universities is 61% for public schools, and 67% for private, non-profit schools.\nJob Outcomes for Brown Grads\nJob placement stats are a good resource for understanding the value of a degree from Brown by providing a look on how job placement has gone for other grads. \nCheck with Brown directly, for information on any information on starting salaries for recent grads.\nBrown\'s Endowment\nAn endowment is the total value of a school\'s investments, donations, and assets. Endowment is not necessarily an indicator of the quality of a school, but it can give you a sense of how much money a college can afford to invest in expanding programs, improving facilities, and support students. \nAs of 2022, the total market value of Brown University\'s endowment was $4.7 billion. The average college endowment was $905 million in 2021. The school spends $34,086 for each full-time student enrolled. \nTuition and Financial Aid at Brown\nTuition is another important factor when choose a college. Some colleges may have high tuition, but do a better job at meeting students\' financial need.\nBrown meets 100% of the demonstrated financial need for undergraduates. The average financial aid package for a full-time, first-year student is around $59,749 a year. \nThe average student debt for graduates in the class of 2022 was around $24,102 per student, not including those with no debt. For context, compare this number with the average national debt, which is around $36,000 per borrower. \nThe 2023-2024 FAFSA Opened on October 1st, 2022\nSome financial aid is awarded on a first-come, first-served basis, so fill out the FAFSA as soon as you can. Visit the FAFSA website to apply for student aid.
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/college_confidential.html
0a69dd533542-4
as soon as you can. Visit the FAFSA website to apply for student aid. Remember, the first F in FAFSA stands for FREE! You should never have to pay to submit the Free Application for Federal Student Aid (FAFSA), so be very wary of anyone asking you for money.\nLearn more about Tuition and Financial Aid at Brown.\nBased on this information, does Brown seem like a good fit? Remember, a school that is perfect for one person may be a terrible fit for someone else! So ask yourself: Is Brown a good school for you?\nIf Brown University seems like a school you want to apply to, click the heart button to save it to your college list.\n\nStill Exploring Schools?\nChoose one of the options below to learn more about Brown:\nAdmissions\nStudent Life\nAcademics\nTuition & Aid\nBrown Community Forums\nThen use the college admissions predictor to take a data science look at your chances of getting into some of the best colleges and universities in the U.S.\nWhere is Brown?\nBrown is located in the urban setting of Providence, Rhode Island, less than an hour from Boston. \nIf you would like to see Brown for yourself, plan a visit. The best way to reach campus is to take Interstate 95 to Providence, or book a flight to the nearest airport, T.F. Green.\nYou can also take a virtual campus tour to get a sense of what Brown and Providence are like without leaving home.\nConsidering Going to School in Rhode Island?\nSee a full list of colleges in Rhode Island and save your favorites to your college list.\n\n\n\nCollege Info\n\n\n\n\n\n\n\n\n\n Providence, RI 02912\n
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/college_confidential.html
0a69dd533542-5
RI 02912\n \n\n\n\n Campus Setting: Urban\n \n\n\n\n\n\n\n\n (401) 863-2378\n \n\n Website\n \n\n Virtual Tour\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nBrown Application Deadline\n\n\n\nFirst-Year Applications are Due\n\nJan 5\n\nTransfer Applications are Due\n\nMar 1\n\n\n\n \n The deadline for Fall first-year applications to Brown is \n Jan 5. \n \n \n \n\n \n
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/college_confidential.html
0a69dd533542-6
\n\n \n The deadline for Fall transfer applications to Brown is \n Mar 1. \n \n \n \n\n \n Check the school website \n for more information about deadlines for specific programs or special admissions programs\n \n \n\n\n\n\n\n\nBrown ACT Scores\n\n\n\n\nic_reflect\n\n\n\n\n\n\n\n\nACT Range\n\n\n \n 33 - 35\n \n \n\n\n\nEstimated Chance of Acceptance by ACT Score\n\n\nACT Score\nEstimated Chance\n\n\n35 and Above\nGood\n\n\n33 to 35\nAvg\n\n\n33 and Less\nLow\n\n\n\n\n\n\nStand out on your college application\n\nโ€ข Qualify for scholarships\nโ€ข Most students who retest improve their score\n\nSponsored by ACT\n\n\n Take the Next ACT Test\n
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/college_confidential.html
0a69dd533542-7
Take the Next ACT Test\n \n\n\n\n\n\nBrown SAT Scores\n\n\n\n\nic_reflect\n\n\n\n\n\n\n\n\nComposite SAT Range\n\n\n \n 720 - 770\n \n \n\n\n\nic_reflect\n\n\n\n\n\n\n\n\nMath SAT Range\n\n\n \n Not available\n \n \n\n\n\nic_reflect\n\n\n\n\n\n\n\n\nReading SAT Range\n\n\n \n 740 - 800\n \n \n\n\n\n\n\n\n Brown Tuition & Fees\n \n\n\n\nTuition & Fees\n\n\n\n
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/college_confidential.html
0a69dd533542-8
& Fees\n\n\n\n $82,286\n \nIn State\n\n\n\n\n $82,286\n \nOut-of-State\n\n\n\n\n\n\n\nCost Breakdown\n\n\nIn State\n\n\nOut-of-State\n\n\n\n\nState Tuition\n\n\n\n $62,680\n \n\n\n\n $62,680\n \n\n\n\n\nFees\n\n\n\n $2,466\n \n\n\n\n $2,466\n
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/college_confidential.html
0a69dd533542-9
\n\n\n\n\nHousing\n\n\n\n $15,840\n \n\n\n\n $15,840\n \n\n\n\n\nBooks\n\n\n\n $1,300\n \n\n\n\n $1,300\n \n\n\n\n\n\n Total (Before Financial Aid):\n \n\n\n\n $82,286\n
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/college_confidential.html
0a69dd533542-10
\n\n\n\n $82,286\n \n\n\n\n\n\n\n\n\n\n\n\nStudent Life\n\n Wondering what life at Brown is like? There are approximately \n 10,696 students enrolled at \n Brown, \n including 7,349 undergraduate students and \n 3,347 graduate students.\n 96% percent of students attend school \n full-time, \n 6% percent are from RI and \n 94% percent of students are from other states.\n \n\n\n\n\n\n None\n \n\n\n\n\nUndergraduate Enrollment\n\n\n\n 96%\n \nFull Time\n\n\n\n\n 4%\n
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/college_confidential.html
0a69dd533542-11
4%\n \nPart Time\n\n\n\n\n\n\n\n 94%\n \n\n\n\n\nResidency\n\n\n\n 6%\n \nIn State\n\n\n\n\n 94%\n \nOut-of-State\n\n\n\n\n\n\n\n Data Source: IPEDs and Peterson\'s Databases ยฉ 2022 Peterson\'s LLC All rights reserved\n \n', lookup_str='', metadata={'source': 'https://www.collegeconfidential.com/colleges/brown-university/'}, lookup_index=0)]
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/college_confidential.html
0a69dd533542-12
previous BiliBili next Gutenberg By Harrison Chase ยฉ Copyright 2023, Harrison Chase. Last updated on Jun 11, 2023.
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/college_confidential.html
e291a5972f4f-0
.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). For SparkR, use setLogLevel(newLevel). 23/05/31 14:08:33 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable df = spark.read.csv('example_data/mlb_teams_2012.csv', header=True) from langchain.document_loaders import PySparkDataFrameLoader loader = PySparkDataFrameLoader(spark, df, page_content_column="Team") loader.load() [Stage 8:> (0 + 1) / 1] [Document(page_content='Nationals', metadata={' "Payroll (millions)"': ' 81.34', ' "Wins"': ' 98'}), Document(page_content='Reds', metadata={' "Payroll (millions)"': ' 82.20', ' "Wins"': ' 97'}), Document(page_content='Yankees', metadata={' "Payroll (millions)"': ' 197.96', ' "Wins"': ' 95'}), Document(page_content='Giants', metadata={' "Payroll (millions)"': ' 117.62', ' "Wins"': ' 94'}), Document(page_content='Braves', metadata={' "Payroll (millions)"': ' 83.31', ' "Wins"': ' 94'}),
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pyspark_dataframe.html
e291a5972f4f-1
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'}), Document(page_content='Rays', metadata={' "Payroll (millions)"': ' 64.17', ' "Wins"': ' 90'}), Document(page_content='Angels', metadata={' "Payroll (millions)"': ' 154.49', ' "Wins"': ' 89'}), Document(page_content='Tigers', metadata={' "Payroll (millions)"': ' 132.30', ' "Wins"': ' 88'}), Document(page_content='Cardinals', metadata={' "Payroll (millions)"': ' 110.30', ' "Wins"': ' 88'}), Document(page_content='Dodgers', metadata={' "Payroll (millions)"': ' 95.14', ' "Wins"': ' 86'}), Document(page_content='White Sox', metadata={' "Payroll (millions)"': ' 96.92', ' "Wins"': ' 85'}), Document(page_content='Brewers', metadata={' "Payroll (millions)"': ' 97.65', ' "Wins"': ' 83'}), Document(page_content='Phillies', metadata={' "Payroll (millions)"': ' 174.54', ' "Wins"': ' 81'}),
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pyspark_dataframe.html
e291a5972f4f-2
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'}), Document(page_content='Mariners', metadata={' "Payroll (millions)"': ' 81.97', ' "Wins"': ' 75'}), Document(page_content='Mets', metadata={' "Payroll (millions)"': ' 93.35', ' "Wins"': ' 74'}), Document(page_content='Blue Jays', metadata={' "Payroll (millions)"': ' 75.48', ' "Wins"': ' 73'}), Document(page_content='Royals', metadata={' "Payroll (millions)"': ' 60.91', ' "Wins"': ' 72'}), Document(page_content='Marlins', metadata={' "Payroll (millions)"': ' 118.07', ' "Wins"': ' 69'}), Document(page_content='Red Sox', metadata={' "Payroll (millions)"': ' 173.18', ' "Wins"': ' 69'}), Document(page_content='Indians', metadata={' "Payroll (millions)"': ' 78.43', ' "Wins"': ' 68'}), Document(page_content='Twins', metadata={' "Payroll (millions)"': ' 94.08', ' "Wins"': ' 66'}),
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pyspark_dataframe.html
e291a5972f4f-3
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'})] previous Psychic next ReadTheDocs Documentation By Harrison Chase ยฉ Copyright 2023, Harrison Chase. Last updated on Jun 11, 2023.
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pyspark_dataframe.html
5a67d8e58b49-0
.ipynb .pdf MediaWikiDump MediaWikiDump# MediaWiki XML Dumps contain the content of a wiki (wiki pages with all their revisions), without the site-related data. A XML dump does not create a full backup of the wiki database, the dump does not contain user accounts, images, edit logs, etc. This covers how to load a MediaWiki XML dump file into a document format that we can use downstream. It uses mwxml from mediawiki-utilities to dump and mwparserfromhell from earwig to parse MediaWiki wikicode. Dump files can be obtained with dumpBackup.php or on the Special:Statistics page of the Wiki. #mediawiki-utilities supports XML schema 0.11 in unmerged branches !pip install -qU git+https://github.com/mediawiki-utilities/python-mwtypes@updates_schema_0.11 #mediawiki-utilities mwxml has a bug, fix PR pending !pip install -qU git+https://github.com/gdedrouas/python-mwxml@xml_format_0.11 !pip install -qU mwparserfromhell from langchain.document_loaders import MWDumpLoader loader = MWDumpLoader("example_data/testmw_pages_current.xml", encoding="utf8") documents = loader.load() print (f'You have {len(documents)} document(s) in your data ') You have 177 document(s) in your data documents[:5] [Document(page_content='\t\n\t\n\tArtist\n\tReleased\n\tRecorded\n\tLength\n\tLabel\n\tProducer', metadata={'source': 'Album'}),
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/mediawikidump.html
5a67d8e58b49-1
Document(page_content='{| class="article-table plainlinks" style="width:100%;"\n|- style="font-size:18px;"\n! style="padding:0px;" | Template documentation\n|-\n| Note: portions of the template sample may not be visible without values provided.\n|-\n| View or edit this documentation. (About template documentation)\n|-\n| Editors can experiment in this template\'s [ sandbox] and [ test case] pages.\n|}Category:Documentation templates', metadata={'source': 'Documentation'}),
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/mediawikidump.html
5a67d8e58b49-2
Document(page_content='Description\nThis template is used to insert descriptions on template pages.\n\nSyntax\nAdd <noinclude></noinclude> at the end of the template page.\n\nAdd <noinclude></noinclude> to transclude an alternative page from the /doc subpage.\n\nUsage\n\nOn the Template page\nThis is the normal format when used:\n\nTEMPLATE CODE\n<includeonly>Any categories to be inserted into articles by the template</includeonly>\n<noinclude>{{Documentation}}</noinclude>\n\nIf your template is not a completed div or table, you may need to close the tags just before {{Documentation}} is inserted (within the noinclude tags).\n\nA line break right before {{Documentation}} can also be useful as it helps prevent the documentation template "running into" previous code.\n\nOn the documentation page\nThe documentation page is usually located on the /doc subpage for a template, but a different page can be specified with the first parameter of the template (see Syntax).\n\nNormally, you will want to write something like the following on the documentation page:\n\n==Description==\nThis template is used to do something.\n\n==Syntax==\nType <code>{{t|templatename}}</code> somewhere.\n\n==Samples==\n<code><nowiki>{{templatename|input}}</nowiki></code> \n\nresults in...\n\n{{templatename|input}}\n\n<includeonly>Any categories for the template itself</includeonly>\n<noinclude>[[Category:Template documentation]]</noinclude>\n\nUse any or all of the above description/syntax/sample output sections. You may also want to add "see also" or other sections.\n\nNote that the above example also uses the Template:T template.\n\nCategory:Documentation templatesCategory:Template documentation', metadata={'source':
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/mediawikidump.html
5a67d8e58b49-3
the Template:T template.\n\nCategory:Documentation templatesCategory:Template documentation', metadata={'source': 'Documentation/doc'}),
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/mediawikidump.html
5a67d8e58b49-4
Document(page_content='Description\nA template link with a variable number of parameters (0-20).\n\nSyntax\n \n\nSource\nImproved version not needing t/piece subtemplate developed on Templates wiki see the list of authors. Copied here via CC-By-SA 3.0 license.\n\nExample\n\nCategory:General wiki templates\nCategory:Template documentation', metadata={'source': 'T/doc'}), Document(page_content='\t\n\t\t \n\t\n\t\t Aliases\n\t Relatives\n\t Affiliation\n Occupation\n \n Biographical information\n Marital status\n \tDate of birth\n Place of birth\n Date of death\n Place of death\n \n Physical description\n Species\n Gender\n Height\n Weight\n Eye color\n\t\n Appearances\n Portrayed by\n Appears in\n Debut\n ', metadata={'source': 'Character'})] previous IMSDb next Wikipedia By Harrison Chase ยฉ Copyright 2023, Harrison Chase. Last updated on Jun 11, 2023.
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/mediawikidump.html
93bd4766c5cb-0
.ipynb .pdf Joplin Joplin# Joplin is an open source note-taking app. Capture your thoughts and securely access them from any device. This notebook covers how to load documents from a Joplin database. Joplin has a REST API for accessing its local database. This loader uses the API to retrieve all notes in the database and their metadata. This requires an access token that can be obtained from the app by following these steps: Open the Joplin app. The app must stay open while the documents are being loaded. Go to settings / options and select โ€œWeb Clipperโ€. Make sure that the Web Clipper service is enabled. Under โ€œAdvanced Optionsโ€, copy the authorization token. You may either initialize the loader directly with the access token, or store it in the environment variable JOPLIN_ACCESS_TOKEN. An alternative to this approach is to export the Joplinโ€™s note database to Markdown files (optionally, with Front Matter metadata) and use a Markdown loader, such as ObsidianLoader, to load them. from langchain.document_loaders import JoplinLoader loader = JoplinLoader(access_token="<access-token>") docs = loader.load() previous Iugu next Microsoft OneDrive By Harrison Chase ยฉ Copyright 2023, Harrison Chase. Last updated on Jun 11, 2023.
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/joplin.html
be8912faa00f-0
.ipynb .pdf Microsoft OneDrive Contents Prerequisites ๐Ÿง‘ Instructions for ingesting your documents from OneDrive ๐Ÿ”‘ Authentication ๐Ÿ—‚๏ธ Documents loader ๐Ÿ“‘ Loading documents from a OneDrive Directory ๐Ÿ“‘ Loading documents from a list of Documents IDs Microsoft OneDrive# Microsoft OneDrive (formerly SkyDrive) is a file hosting service operated by Microsoft. This notebook covers how to load documents from OneDrive. Currently, only docx, doc, and pdf files are supported. Prerequisites# Register an application with the Microsoft identity platform instructions. When registration finishes, the Azure portal displays the app registrationโ€™s Overview pane. You see the Application (client) ID. Also called the client ID, this value uniquely identifies your application in the Microsoft identity platform. During the steps you will be following at item 1, you can set the redirect URI as http://localhost:8000/callback During the steps you will be following at item 1, generate a new password (client_secret) underย Application Secretsย section. Follow the instructions at this document to add the following SCOPES (offline_access and Files.Read.All) to your application. Visit the Graph Explorer Playground to obtain your OneDrive ID. The first step is to ensure you are logged in with the account associated your OneDrive account. Then you need to make a request to https://graph.microsoft.com/v1.0/me/drive and the response will return a payload with a field id that holds the ID of your OneDrive account. You need to install the o365 package using the command pip install o365. At the end of the steps you must have the following values: CLIENT_ID CLIENT_SECRET DRIVE_ID ๐Ÿง‘ Instructions for ingesting your documents from OneDrive# ๐Ÿ”‘ Authentication#
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/microsoft_onedrive.html
be8912faa00f-1
๐Ÿง‘ Instructions for ingesting your documents from OneDrive# ๐Ÿ”‘ Authentication# By default, the OneDriveLoader expects that the values of CLIENT_ID and CLIENT_SECRET must be stored as environment variables named O365_CLIENT_ID and O365_CLIENT_SECRET respectively. You could pass those environment variables through a .env file at the root of your application or using the following command in your script. os.environ['O365_CLIENT_ID'] = "YOUR CLIENT ID" os.environ['O365_CLIENT_SECRET'] = "YOUR CLIENT SECRET" This loader uses an authentication called on behalf of a user. It is a 2 step authentication with user consent. When you instantiate the loader, it will call will print a url that the user must visit to give consent to the app on the required permissions. The user must then visit this url and give consent to the application. Then the user must copy the resulting page url and paste it back on the console. The method will then return True if the login attempt was succesful. from langchain.document_loaders.onedrive import OneDriveLoader loader = OneDriveLoader(drive_id="YOUR DRIVE ID") Once the authentication has been done, the loader will store a token (o365_token.txt) at ~/.credentials/ folder. This token could be used later to authenticate without the copy/paste steps explained earlier. To use this token for authentication, you need to change the auth_with_token parameter to True in the instantiation of the loader. from langchain.document_loaders.onedrive import OneDriveLoader loader = OneDriveLoader(drive_id="YOUR DRIVE ID", auth_with_token=True) ๐Ÿ—‚๏ธ Documents loader# ๐Ÿ“‘ Loading documents from a OneDrive Directory# OneDriveLoader can load documents from a specific folder within your OneDrive. For instance, you want to load all documents that are stored at Documents/clients folder within your OneDrive.
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/microsoft_onedrive.html
be8912faa00f-2
from langchain.document_loaders.onedrive import OneDriveLoader loader = OneDriveLoader(drive_id="YOUR DRIVE ID", folder_path="Documents/clients", auth_with_token=True) documents = loader.load() ๐Ÿ“‘ Loading documents from a list of Documents IDs# Another possibility is to provide a list of object_id for each document you want to load. For that, you will need to query the Microsoft Graph API to find all the documents ID that you are interested in. This link provides a list of endpoints that will be helpful to retrieve the documents ID. For instance, to retrieve information about all objects that are stored at the root of the Documents folder, you need make a request to: https://graph.microsoft.com/v1.0/drives/{YOUR DRIVE ID}/root/children. Once you have the list of IDs that you are interested in, then you can instantiate the loader with the following parameters. from langchain.document_loaders.onedrive import OneDriveLoader loader = OneDriveLoader(drive_id="YOUR DRIVE ID", object_ids=["ID_1", "ID_2"], auth_with_token=True) documents = loader.load() previous Joplin next Modern Treasury Contents Prerequisites ๐Ÿง‘ Instructions for ingesting your documents from OneDrive ๐Ÿ”‘ Authentication ๐Ÿ—‚๏ธ Documents loader ๐Ÿ“‘ Loading documents from a OneDrive Directory ๐Ÿ“‘ Loading documents from a list of Documents IDs By Harrison Chase ยฉ Copyright 2023, Harrison Chase. Last updated on Jun 11, 2023.
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/microsoft_onedrive.html
480334df20ac-0
.ipynb .pdf Notion DB 1/2 Contents ๐Ÿง‘ Instructions for ingesting your own dataset Notion DB 1/2# Notion is a collaboration platform with modified Markdown support that integrates kanban boards, tasks, wikis and databases. It is an all-in-one workspace for notetaking, knowledge and data management, and project and task management. This notebook covers how to load documents from a Notion database dump. In order to get this notion dump, follow these instructions: ๐Ÿง‘ Instructions for ingesting your own dataset# Export your dataset from Notion. You can do this by clicking on the three dots in the upper right hand corner and then clicking Export. When exporting, make sure to select the Markdown & CSV format option. This will produce a .zip file in your Downloads folder. Move the .zip file into this repository. Run the following command to unzip the zip file (replace the Export... with your own file name as needed). unzip Export-d3adfe0f-3131-4bf3-8987-a52017fc1bae.zip -d Notion_DB Run the following command to ingest the data. from langchain.document_loaders import NotionDirectoryLoader loader = NotionDirectoryLoader("Notion_DB") docs = loader.load() previous Notion DB 2/2 next Obsidian Contents ๐Ÿง‘ Instructions for ingesting your own dataset By Harrison Chase ยฉ Copyright 2023, Harrison Chase. Last updated on Jun 11, 2023.
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/notion.html
52e7d3825686-0
.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 that primarily handles content management activities. A loader for Confluence pages. This currently supports username/api_key, Oauth2 login. Additionally, on-prem installations also support token authentication. Specify a list page_id-s and/or space_key to load in the corresponding pages into Document objects, if both are specified the union of both sets will be returned. You can also specify a boolean include_attachments to include attachments, this is set to False by default, if set to True all attachments will be downloaded and ConfluenceReader will extract the text from the attachments and add it to the Document object. Currently supported attachment types are: PDF, PNG, JPEG/JPG, SVG, Word and Excel. Hint: space_key and page_id can both be found in the URL of a page in Confluence - https://yoursite.atlassian.com/wiki/spaces/<space_key>/pages/<page_id> Before using ConfluenceLoader make sure you have the latest version of the atlassian-python-api package installed: #!pip install atlassian-python-api Examples# Username and Password or Username and API Token (Atlassian Cloud only)# This example authenticates using either a username and password or, if youโ€™re connecting to an Atlassian Cloud hosted version of Confluence, a username and an API Token. You can generate an API token at: https://id.atlassian.com/manage-profile/security/api-tokens. The limit parameter specifies how many documents will be retrieved in a single call, not how many documents will be retrieved in total.
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/confluence.html
52e7d3825686-1
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 = ConfluenceLoader( url="https://yoursite.atlassian.com/wiki", username="me", api_key="12345" ) documents = loader.load(space_key="SPACE", include_attachments=True, limit=50) Personal Access Token (Server/On-Prem only)# This method is valid for the Data Center/Server on-prem edition only. For more information on how to generate a Personal Access Token (PAT) check the official Confluence documentation at: https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html. When using a PAT you provide only the token value, you cannot provide a username. Please note that ConfluenceLoader will run under the permissions of the user that generated the PAT and will only be able to load documents for which said user has access to. from langchain.document_loaders import ConfluenceLoader loader = ConfluenceLoader( url="https://yoursite.atlassian.com/wiki", token="12345" ) documents = loader.load(space_key="SPACE", include_attachments=True, limit=50, max_pages=50) previous ChatGPT Data next Diffbot Contents Confluence Examples Username and Password or Username and API Token (Atlassian Cloud only) Personal Access Token (Server/On-Prem only) By Harrison Chase ยฉ Copyright 2023, Harrison Chase. Last updated on Jun 11, 2023.
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/confluence.html
538ac60f67f6-0
.ipynb .pdf AWS S3 Directory Contents Specifying a prefix AWS S3 Directory# Amazon Simple Storage Service (Amazon S3) is an object storage service AWS S3 Directory This covers how to load document objects from an AWS S3 Directory object. #!pip install boto3 from langchain.document_loaders import S3DirectoryLoader loader = S3DirectoryLoader("testing-hwc") loader.load() Specifying a prefix# You can also specify a prefix for more finegrained control over what files to load. loader = S3DirectoryLoader("testing-hwc", prefix="fake") loader.load() [Document(page_content='Lorem ipsum dolor sit amet.', lookup_str='', metadata={'source': '/var/folders/y6/8_bzdg295ld6s1_97_12m4lr0000gn/T/tmpujbkzf_l/fake.docx'}, lookup_index=0)] previous Apify Dataset next AWS S3 File Contents Specifying a prefix By Harrison Chase ยฉ Copyright 2023, Harrison Chase. Last updated on Jun 11, 2023.
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/aws_s3_directory.html
e441e8e15411-0
.ipynb .pdf EverNote EverNote# EverNote is intended for archiving and creating notes in which photos, audio and saved web content can be embedded. Notes are stored in virtual โ€œnotebooksโ€ and can be tagged, annotated, edited, searched, and exported. This notebook shows how to load an Evernote export file (.enex) from disk. A document will be created for each note in the export. # lxml and html2text are required to parse EverNote notes # !pip install lxml # !pip install html2text from langchain.document_loaders import EverNoteLoader # By default all notes are combined into a single Document loader = EverNoteLoader("example_data/testing.enex") loader.load() [Document(page_content='testing this\n\nwhat happens?\n\nto the world?**Jan - March 2022**', metadata={'source': 'example_data/testing.enex'})] # It's likely more useful to return a Document for each note loader = EverNoteLoader("example_data/testing.enex", load_single_document=False) loader.load() [Document(page_content='testing this\n\nwhat happens?\n\nto the world?', metadata={'title': 'testing', 'created': time.struct_time(tm_year=2023, tm_mon=2, tm_mday=9, tm_hour=3, tm_min=47, tm_sec=46, tm_wday=3, tm_yday=40, tm_isdst=-1), 'updated': time.struct_time(tm_year=2023, tm_mon=2, tm_mday=9, tm_hour=3, tm_min=53, tm_sec=28, tm_wday=3, tm_yday=40, tm_isdst=-1), 'note-attributes.author': 'Harrison Chase', 'source': 'example_data/testing.enex'}),
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/evernote.html
e441e8e15411-1
Document(page_content='**Jan - March 2022**', metadata={'title': 'Summer Training Program', 'created': time.struct_time(tm_year=2022, tm_mon=12, tm_mday=27, tm_hour=1, tm_min=59, tm_sec=48, tm_wday=1, tm_yday=361, tm_isdst=-1), 'note-attributes.author': 'Mike McGarry', 'note-attributes.source': 'mobile.iphone', 'source': 'example_data/testing.enex'})] previous EPub next Microsoft Excel By Harrison Chase ยฉ Copyright 2023, Harrison Chase. Last updated on Jun 11, 2023.
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/evernote.html
446674468443-0
.ipynb .pdf Google Cloud Storage Directory Contents Specifying a prefix Google Cloud Storage Directory# Google Cloud Storage is a managed service for storing unstructured data. This covers how to load document objects from an Google Cloud Storage (GCS) directory (bucket). # !pip install google-cloud-storage from langchain.document_loaders import GCSDirectoryLoader loader = GCSDirectoryLoader(project_name="aist", bucket="testing-hwc") loader.load() /Users/harrisonchase/workplace/langchain/.venv/lib/python3.10/site-packages/google/auth/_default.py:83: UserWarning: Your application has authenticated using end user credentials from Google Cloud SDK without a quota project. You might receive a "quota exceeded" or "API not enabled" error. We recommend you rerun `gcloud auth application-default login` and make sure a quota project is added. Or you can use service accounts instead. For more information about service accounts, see https://cloud.google.com/docs/authentication/ warnings.warn(_CLOUD_SDK_CREDENTIALS_WARNING) /Users/harrisonchase/workplace/langchain/.venv/lib/python3.10/site-packages/google/auth/_default.py:83: UserWarning: Your application has authenticated using end user credentials from Google Cloud SDK without a quota project. You might receive a "quota exceeded" or "API not enabled" error. We recommend you rerun `gcloud auth application-default login` and make sure a quota project is added. Or you can use service accounts instead. For more information about service accounts, see https://cloud.google.com/docs/authentication/ warnings.warn(_CLOUD_SDK_CREDENTIALS_WARNING)
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/google_cloud_storage_directory.html
446674468443-1
warnings.warn(_CLOUD_SDK_CREDENTIALS_WARNING) [Document(page_content='Lorem ipsum dolor sit amet.', lookup_str='', metadata={'source': '/var/folders/y6/8_bzdg295ld6s1_97_12m4lr0000gn/T/tmpz37njh7u/fake.docx'}, lookup_index=0)] Specifying a prefix# You can also specify a prefix for more finegrained control over what files to load. loader = GCSDirectoryLoader(project_name="aist", bucket="testing-hwc", prefix="fake") loader.load() /Users/harrisonchase/workplace/langchain/.venv/lib/python3.10/site-packages/google/auth/_default.py:83: UserWarning: Your application has authenticated using end user credentials from Google Cloud SDK without a quota project. You might receive a "quota exceeded" or "API not enabled" error. We recommend you rerun `gcloud auth application-default login` and make sure a quota project is added. Or you can use service accounts instead. For more information about service accounts, see https://cloud.google.com/docs/authentication/ warnings.warn(_CLOUD_SDK_CREDENTIALS_WARNING) /Users/harrisonchase/workplace/langchain/.venv/lib/python3.10/site-packages/google/auth/_default.py:83: UserWarning: Your application has authenticated using end user credentials from Google Cloud SDK without a quota project. You might receive a "quota exceeded" or "API not enabled" error. We recommend you rerun `gcloud auth application-default login` and make sure a quota project is added. Or you can use service accounts instead. For more information about service accounts, see https://cloud.google.com/docs/authentication/ warnings.warn(_CLOUD_SDK_CREDENTIALS_WARNING)
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/google_cloud_storage_directory.html
446674468443-2
warnings.warn(_CLOUD_SDK_CREDENTIALS_WARNING) [Document(page_content='Lorem ipsum dolor sit amet.', lookup_str='', metadata={'source': '/var/folders/y6/8_bzdg295ld6s1_97_12m4lr0000gn/T/tmpylg6291i/fake.docx'}, lookup_index=0)] previous Google BigQuery next Google Cloud Storage File Contents Specifying a prefix By Harrison Chase ยฉ Copyright 2023, Harrison Chase. Last updated on Jun 11, 2023.
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/google_cloud_storage_directory.html
3192fc896f7a-0
.ipynb .pdf Twitter Twitter# Twitter is an online social media and social networking service. This loader fetches the text from the Tweets of a list of Twitter users, using the tweepy Python package. You must initialize the loader with your Twitter API token, and you need to pass in the Twitter username you want to extract. from langchain.document_loaders import TwitterTweetLoader #!pip install tweepy loader = TwitterTweetLoader.from_bearer_token( oauth2_bearer_token="YOUR BEARER TOKEN", twitter_users=['elonmusk'], number_tweets=50, # Default value is 100 ) # Or load from access token and consumer keys # loader = TwitterTweetLoader.from_secrets( # access_token='YOUR ACCESS TOKEN', # access_token_secret='YOUR ACCESS TOKEN SECRET', # consumer_key='YOUR CONSUMER KEY', # consumer_secret='YOUR CONSUMER SECRET', # twitter_users=['elonmusk'], # number_tweets=50, # ) documents = loader.load() documents[:5]
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/twitter.html
3192fc896f7a-1
[Document(page_content='@MrAndyNgo @REI One store after another shutting down', metadata={'created_at': 'Tue Apr 18 03:45:50 +0000 2023', 'user_info': {'id': 44196397, 'id_str': '44196397', 'name': 'Elon Musk', 'screen_name': 'elonmusk', 'location': 'A Shortfall of Gravitas', 'profile_location': None, 'description': 'nothing', 'url': None, 'entities': {'description': {'urls': []}}, 'protected': False, 'followers_count': 135528327, 'friends_count': 220, 'listed_count': 120478, 'created_at': 'Tue Jun 02 20:12:29 +0000 2009', 'favourites_count': 21285, 'utc_offset': None, 'time_zone': None, 'geo_enabled': False, 'verified': False, 'statuses_count': 24795, 'lang': None, 'status': {'created_at': 'Tue Apr 18 03:45:50 +0000 2023', 'id': 1648170947541704705, 'id_str': '1648170947541704705', 'text': '@MrAndyNgo @REI One store after another shutting down', 'truncated': False, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [{'screen_name': 'MrAndyNgo', 'name': 'Andy Ngรด ๐Ÿณ๏ธ\u200d๐ŸŒˆ', 'id': 2835451658, 'id_str': '2835451658', 'indices': [0, 10]}, {'screen_name': 'REI', 'name': 'REI', 'id': 16583846, 'id_str': '16583846', 'indices':
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/twitter.html
3192fc896f7a-2
'id': 16583846, 'id_str': '16583846', '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_screen_name': 'MrAndyNgo', 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 118, 'favorite_count': 1286, 'favorited': False, 'retweeted': False, 'lang': 'en'}, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': 'C0DEED', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': False, 'profile_image_url': 'http://pbs.twimg.com/profile_images/1590968738358079488/IY9Gx6Ok_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/1590968738358079488/IY9Gx6Ok_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/44196397/1576183471', 'profile_link_color': '0084B4', 'profile_sidebar_border_color': 'C0DEED', 'profile_sidebar_fill_color': 'DDEEF6', 'profile_text_color': '333333',
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/twitter.html
3192fc896f7a-3
'DDEEF6', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': True, 'default_profile': False, 'default_profile_image': False, 'following': None, 'follow_request_sent': None, 'notifications': None, 'translator_type': 'none', 'withheld_in_countries': []}}),
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/twitter.html
3192fc896f7a-4
Document(page_content='@KanekoaTheGreat @joshrogin @glennbeck Large ships are fundamentally vulnerable to ballistic (hypersonic) missiles', metadata={'created_at': 'Tue Apr 18 03:43:25 +0000 2023', 'user_info': {'id': 44196397, 'id_str': '44196397', 'name': 'Elon Musk', 'screen_name': 'elonmusk', 'location': 'A Shortfall of Gravitas', 'profile_location': None, 'description': 'nothing', 'url': None, 'entities': {'description': {'urls': []}}, 'protected': False, 'followers_count': 135528327, 'friends_count': 220, 'listed_count': 120478, 'created_at': 'Tue Jun 02 20:12:29 +0000 2009', 'favourites_count': 21285, 'utc_offset': None, 'time_zone': None, 'geo_enabled': False, 'verified': False, 'statuses_count': 24795, 'lang': None, 'status': {'created_at': 'Tue Apr 18 03:45:50 +0000 2023', 'id': 1648170947541704705, 'id_str': '1648170947541704705', 'text': '@MrAndyNgo @REI One store after another shutting down', 'truncated': False, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [{'screen_name': 'MrAndyNgo', 'name': 'Andy Ngรด ๐Ÿณ๏ธ\u200d๐ŸŒˆ', 'id': 2835451658, 'id_str': '2835451658', 'indices': [0, 10]}, {'screen_name': 'REI', 'name': 'REI', 'id': 16583846,
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/twitter.html
3192fc896f7a-5
'REI', 'name': 'REI', 'id': 16583846, 'id_str': '16583846', '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_screen_name': 'MrAndyNgo', 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 118, 'favorite_count': 1286, 'favorited': False, 'retweeted': False, 'lang': 'en'}, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': 'C0DEED', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': False, 'profile_image_url': 'http://pbs.twimg.com/profile_images/1590968738358079488/IY9Gx6Ok_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/1590968738358079488/IY9Gx6Ok_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/44196397/1576183471', 'profile_link_color': '0084B4', 'profile_sidebar_border_color': 'C0DEED', 'profile_sidebar_fill_color': 'DDEEF6',
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/twitter.html
3192fc896f7a-6
'C0DEED', 'profile_sidebar_fill_color': 'DDEEF6', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': True, 'default_profile': False, 'default_profile_image': False, 'following': None, 'follow_request_sent': None, 'notifications': None, 'translator_type': 'none', 'withheld_in_countries': []}}),
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/twitter.html
3192fc896f7a-7
Document(page_content='@KanekoaTheGreat The Golden Rule', metadata={'created_at': 'Tue Apr 18 03:37:17 +0000 2023', 'user_info': {'id': 44196397, 'id_str': '44196397', 'name': 'Elon Musk', 'screen_name': 'elonmusk', 'location': 'A Shortfall of Gravitas', 'profile_location': None, 'description': 'nothing', 'url': None, 'entities': {'description': {'urls': []}}, 'protected': False, 'followers_count': 135528327, 'friends_count': 220, 'listed_count': 120478, 'created_at': 'Tue Jun 02 20:12:29 +0000 2009', 'favourites_count': 21285, 'utc_offset': None, 'time_zone': None, 'geo_enabled': False, 'verified': False, 'statuses_count': 24795, 'lang': None, 'status': {'created_at': 'Tue Apr 18 03:45:50 +0000 2023', 'id': 1648170947541704705, 'id_str': '1648170947541704705', 'text': '@MrAndyNgo @REI One store after another shutting down', 'truncated': False, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [{'screen_name': 'MrAndyNgo', 'name': 'Andy Ngรด ๐Ÿณ๏ธ\u200d๐ŸŒˆ', 'id': 2835451658, 'id_str': '2835451658', 'indices': [0, 10]}, {'screen_name': 'REI', 'name': 'REI', 'id': 16583846, 'id_str': '16583846', 'indices': [11,
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/twitter.html
3192fc896f7a-8
16583846, 'id_str': '16583846', '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_screen_name': 'MrAndyNgo', 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 118, 'favorite_count': 1286, 'favorited': False, 'retweeted': False, 'lang': 'en'}, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': 'C0DEED', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': False, 'profile_image_url': 'http://pbs.twimg.com/profile_images/1590968738358079488/IY9Gx6Ok_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/1590968738358079488/IY9Gx6Ok_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/44196397/1576183471', 'profile_link_color': '0084B4', 'profile_sidebar_border_color': 'C0DEED', 'profile_sidebar_fill_color': 'DDEEF6', 'profile_text_color': '333333',
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/twitter.html
3192fc896f7a-9
'DDEEF6', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': True, 'default_profile': False, 'default_profile_image': False, 'following': None, 'follow_request_sent': None, 'notifications': None, 'translator_type': 'none', 'withheld_in_countries': []}}),
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/twitter.html
3192fc896f7a-10
Document(page_content='@KanekoaTheGreat ๐Ÿง', metadata={'created_at': 'Tue Apr 18 03:35:48 +0000 2023', 'user_info': {'id': 44196397, 'id_str': '44196397', 'name': 'Elon Musk', 'screen_name': 'elonmusk', 'location': 'A Shortfall of Gravitas', 'profile_location': None, 'description': 'nothing', 'url': None, 'entities': {'description': {'urls': []}}, 'protected': False, 'followers_count': 135528327, 'friends_count': 220, 'listed_count': 120478, 'created_at': 'Tue Jun 02 20:12:29 +0000 2009', 'favourites_count': 21285, 'utc_offset': None, 'time_zone': None, 'geo_enabled': False, 'verified': False, 'statuses_count': 24795, 'lang': None, 'status': {'created_at': 'Tue Apr 18 03:45:50 +0000 2023', 'id': 1648170947541704705, 'id_str': '1648170947541704705', 'text': '@MrAndyNgo @REI One store after another shutting down', 'truncated': False, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [{'screen_name': 'MrAndyNgo', 'name': 'Andy Ngรด ๐Ÿณ๏ธ\u200d๐ŸŒˆ', 'id': 2835451658, 'id_str': '2835451658', 'indices': [0, 10]}, {'screen_name': 'REI', 'name': 'REI', 'id': 16583846, 'id_str': '16583846', 'indices': [11,
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/twitter.html
3192fc896f7a-11
16583846, 'id_str': '16583846', '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_screen_name': 'MrAndyNgo', 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 118, 'favorite_count': 1286, 'favorited': False, 'retweeted': False, 'lang': 'en'}, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': 'C0DEED', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': False, 'profile_image_url': 'http://pbs.twimg.com/profile_images/1590968738358079488/IY9Gx6Ok_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/1590968738358079488/IY9Gx6Ok_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/44196397/1576183471', 'profile_link_color': '0084B4', 'profile_sidebar_border_color': 'C0DEED', 'profile_sidebar_fill_color': 'DDEEF6', 'profile_text_color': '333333',
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/twitter.html
3192fc896f7a-12
'DDEEF6', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': True, 'default_profile': False, 'default_profile_image': False, 'following': None, 'follow_request_sent': None, 'notifications': None, 'translator_type': 'none', 'withheld_in_countries': []}}),
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/twitter.html
3192fc896f7a-13
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': None, 'description': 'nothing', 'url': None, 'entities': {'description': {'urls': []}}, 'protected': False, 'followers_count': 135528327, 'friends_count': 220, 'listed_count': 120478, 'created_at': 'Tue Jun 02 20:12:29 +0000 2009', 'favourites_count': 21285, 'utc_offset': None, 'time_zone': None, 'geo_enabled': False, 'verified': False, 'statuses_count': 24795, 'lang': None, 'status': {'created_at': 'Tue Apr 18 03:45:50 +0000 2023', 'id': 1648170947541704705, 'id_str': '1648170947541704705', 'text': '@MrAndyNgo @REI One store after another shutting down', 'truncated': False, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [{'screen_name': 'MrAndyNgo', 'name': 'Andy Ngรด ๐Ÿณ๏ธ\u200d๐ŸŒˆ', 'id': 2835451658, 'id_str': '2835451658', 'indices': [0, 10]}, {'screen_name': 'REI', 'name': 'REI', 'id': 16583846, 'id_str': '16583846',
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/twitter.html
3192fc896f7a-14
'id': 16583846, 'id_str': '16583846', '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_screen_name': 'MrAndyNgo', 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 118, 'favorite_count': 1286, 'favorited': False, 'retweeted': False, 'lang': 'en'}, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': 'C0DEED', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': False, 'profile_image_url': 'http://pbs.twimg.com/profile_images/1590968738358079488/IY9Gx6Ok_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/1590968738358079488/IY9Gx6Ok_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/44196397/1576183471', 'profile_link_color': '0084B4', 'profile_sidebar_border_color': 'C0DEED', 'profile_sidebar_fill_color': 'DDEEF6', 'profile_text_color': '333333',
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/twitter.html
3192fc896f7a-15
'DDEEF6', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': True, 'default_profile': False, 'default_profile_image': False, 'following': None, 'follow_request_sent': None, 'notifications': None, 'translator_type': 'none', 'withheld_in_countries': []}})]
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/twitter.html
3192fc896f7a-16
previous 2Markdown next Text Splitters By Harrison Chase ยฉ Copyright 2023, Harrison Chase. Last updated on Jun 11, 2023.
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/twitter.html
10cdb1a339d4-0
.ipynb .pdf AZLyrics AZLyrics# AZLyrics is a large, legal, every day growing collection of lyrics. This covers how to load AZLyrics webpages into a document format that we can use downstream. from langchain.document_loaders import AZLyricsLoader loader = AZLyricsLoader("https://www.azlyrics.com/lyrics/mileycyrus/flowers.html") data = loader.load() data
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/azlyrics.html
10cdb1a339d4-1
[Document(page_content="Miley Cyrus - Flowers Lyrics | AZLyrics.com\n\r\nWe were good, we were gold\nKinda dream that can't be sold\nWe were right till we weren't\nBuilt a home and watched it burn\n\nI didn't wanna leave you\nI didn't wanna lie\nStarted to cry but then remembered I\n\nI can buy myself flowers\nWrite my name in the sand\nTalk to myself for hours\nSay things you don't understand\nI can take myself dancing\nAnd I can hold my own hand\nYeah, I can love me better than you can\n\nCan love me better\nI can love me better, baby\nCan love me better\nI can love me better, baby\n\nPaint my nails, cherry red\nMatch the roses that you left\nNo remorse, no regret\nI forgive every word you said\n\nI didn't wanna leave you, baby\nI didn't wanna fight\nStarted to cry but then remembered I\n\nI can buy myself flowers\nWrite my name in the sand\nTalk to myself for hours, yeah\nSay things you don't understand\nI can take myself dancing\nAnd I can hold my own hand\nYeah, I can love me better than you can\n\nCan love me better\nI can love me better, baby\nCan love me better\nI can love me better, baby\nCan love me better\nI can love me better, baby\nCan love me better\nI\n\nI didn't wanna wanna leave you\nI didn't wanna fight\nStarted to cry but then remembered I\n\nI can buy myself flowers\nWrite my name in the sand\nTalk to myself for hours (Yeah)\nSay things you don't understand\nI can take myself dancing\nAnd I can hold my own hand\nYeah, I can love me better than\nYeah, I can love me better than you can, uh\n\nCan love me
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/azlyrics.html
10cdb1a339d4-2
better than\nYeah, I can love me better than you can, uh\n\nCan love me better\nI can love me better, baby\nCan love me better\nI can love me better, baby (Than you can)\nCan love me better\nI can love me better, baby\nCan love me better\nI\n", lookup_str='', metadata={'source': 'https://www.azlyrics.com/lyrics/mileycyrus/flowers.html'}, lookup_index=0)]
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/azlyrics.html
10cdb1a339d4-3
previous Arxiv next BiliBili By Harrison Chase ยฉ Copyright 2023, Harrison Chase. Last updated on Jun 11, 2023.
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/azlyrics.html
9cb973bbcf64-0
.ipynb .pdf Spreedly Spreedly# Spreedly is a service that allows you to securely store credit cards and use them to transact against any number of payment gateways and third party APIs. It does this by simultaneously providing a card tokenization/vault service as well as a gateway and receiver integration service. Payment methods tokenized by Spreedly are stored at Spreedly, allowing you to independently store a card and then pass that card to different end points based on your business requirements. This notebook covers how to load data from the Spreedly REST API into a format that can be ingested into LangChain, along with example usage for vectorization. Note: this notebook assumes the following packages are installed: openai, chromadb, and tiktoken. import os from langchain.document_loaders import SpreedlyLoader from langchain.indexes import VectorstoreIndexCreator Spreedly API requires an access token, which can be found inside the Spreedly Admin Console. This document loader does not currently support pagination, nor access to more complex objects which require additional parameters. It also requires a resource option which defines what objects you want to load. Following resources are available: gateways_options: Documentation gateways: Documentation receivers_options: Documentation receivers: Documentation payment_methods: Documentation certificates: Documentation transactions: Documentation environments: Documentation spreedly_loader = SpreedlyLoader(os.environ["SPREEDLY_ACCESS_TOKEN"], "gateways_options") # Create a vectorstore retriver from the loader # see https://python.langchain.com/en/latest/modules/indexes/getting_started.html for more details index = VectorstoreIndexCreator().from_loaders([spreedly_loader]) spreedly_doc_retriever = index.vectorstore.as_retriever() Using embedded DuckDB without persistence: data will be transient
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/spreedly.html
9cb973bbcf64-1
Using embedded DuckDB without persistence: data will be transient # Test the retriever spreedly_doc_retriever.get_relevant_documents("CRC") [Document(page_content='installment_grace_period_duration\nreference_data_code\ninvoice_number\ntax_management_indicator\noriginal_amount\ninvoice_amount\nvat_tax_rate\nmobile_remote_payment_type\ngratuity_amount\nmdd_field_1\nmdd_field_2\nmdd_field_3\nmdd_field_4\nmdd_field_5\nmdd_field_6\nmdd_field_7\nmdd_field_8\nmdd_field_9\nmdd_field_10\nmdd_field_11\nmdd_field_12\nmdd_field_13\nmdd_field_14\nmdd_field_15\nmdd_field_16\nmdd_field_17\nmdd_field_18\nmdd_field_19\nmdd_field_20\nsupported_countries: US\nAE\nBR\nCA\nCN\nDK\nFI\nFR\nDE\nIN\nJP\nMX\nNO\nSE\nGB\nSG\nLB\nPK\nsupported_cardtypes: visa\nmaster\namerican_express\ndiscover\ndiners_club\njcb\ndankort\nmaestro\nelo\nregions: asia_pacific\neurope\nlatin_america\nnorth_america\nhomepage: http://www.cybersource.com\ndisplay_api_url: https://ics2wsa.ic3.com/commerce/1.x/transactionProcessor\ncompany_name: CyberSource', metadata={'source': 'https://core.spreedly.com/v1/gateways_options.json'}),
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/spreedly.html
9cb973bbcf64-2
Document(page_content='BG\nBH\nBI\nBJ\nBM\nBN\nBO\nBR\nBS\nBT\nBW\nBY\nBZ\nCA\nCC\nCF\nCH\nCK\nCL\nCM\nCN\nCO\nCR\nCV\nCX\nCY\nCZ\nDE\nDJ\nDK\nDO\nDZ\nEC\nEE\nEG\nEH\nES\nET\nFI\nFJ\nFK\nFM\nFO\nFR\nGA\nGB\nGD\nGE\nGF\nGG\nGH\nGI\nGL\nGM\nGN\nGP\nGQ\nGR\nGT\nGU\nGW\nGY\nHK\nHM\nHN\nHR\nHT\nHU\nID\nIE\nIL\nIM\nIN\nIO\nIS\nIT\nJE\nJM\nJO\nJP\nKE\nKG\nKH\nKI\nKM\nKN\nKR\nKW\nKY\nKZ\nLA\nLC\nLI\nLK\n
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/spreedly.html
9cb973bbcf64-3
KZ\nLA\nLC\nLI\nLK\nLS\nLT\nLU\nLV\nMA\nMC\nMD\nME\nMG\nMH\nMK\nML\nMN\nMO\nMP\nMQ\nMR\nMS\nMT\nMU\nMV\nMW\nMX\nMY\nMZ\nNA\nNC\nNE\nNF\nNG\nNI\nNL\nNO\nNP\nNR\nNU\nNZ\nOM\nPA\nPE\nPF\nPH\nPK\nPL\nPN\nPR\nPT\nPW\nPY\nQA\nRE\nRO\nRS\nRU\nRW\nSA\nSB\nSC\nSE\nSG\nSI\nSK\nSL\nSM\nSN\nST\nSV\nSZ\nTC\nTD\nTF\nTG\nTH\nTJ\nTK\nTM\nTO\nTR\nTT\nTV\nTW\nTZ\nUA\nUG\nUS\nUY\nUZ\nVA\nVC\nVE\nVI\nVN\nVU\nWF\nWS\n
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/spreedly.html
9cb973bbcf64-4
VI\nVN\nVU\nWF\nWS\nYE\nYT\nZA\nZM\nsupported_cardtypes:
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/spreedly.html
9cb973bbcf64-5
visa\nmaster\namerican_express\ndiscover\njcb\nmaestro\nelo\nnaranja\ncabal\nunionpay\nregions: asia_pacific\neurope\nmiddle_east\nnorth_america\nhomepage: http://worldpay.com\ndisplay_api_url: https://secure.worldpay.com/jsp/merchant/xml/paymentService.jsp\ncompany_name: WorldPay', metadata={'source': 'https://core.spreedly.com/v1/gateways_options.json'}),
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/spreedly.html
9cb973bbcf64-6
Document(page_content='gateway_specific_fields: receipt_email\nradar_session_id\nskip_radar_rules\napplication_fee\nstripe_account\nmetadata\nidempotency_key\nreason\nrefund_application_fee\nrefund_fee_amount\nreverse_transfer\naccount_id\ncustomer_id\nvalidate\nmake_default\ncancellation_reason\ncapture_method\nconfirm\nconfirmation_method\ncustomer\ndescription\nmoto\noff_session\non_behalf_of\npayment_method_types\nreturn_email\nreturn_url\nsave_payment_method\nsetup_future_usage\nstatement_descriptor\nstatement_descriptor_suffix\ntransfer_amount\ntransfer_destination\ntransfer_group\napplication_fee_amount\nrequest_three_d_secure\nerror_on_requires_action\nnetwork_transaction_id\nclaim_without_transaction_id\nfulfillment_date\nevent_type\nmodal_challenge\nidempotent_request\nmerchant_reference\ncustomer_reference\nshipping_address_zip\nshipping_from_zip\nshipping_amount\nline_items\nsupported_countries: AE\nAT\nAU\nBE\nBG\nBR\nCA\nCH\nCY\nCZ\nDE\nDK\nEE\nES\nFI\nFR\nGB\nGR\nHK\nHU\nIE\nIN\nIT\nJP\nLT\nLU\nLV\nMT\nMX\nMY\nNL\nNO\nNZ\nPL\nPT\nRO\nSE\nSG\nSI\nSK\nUS\nsupported_cardtypes: visa', metadata={'source': 'https://core.spreedly.com/v1/gateways_options.json'}),
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/spreedly.html
9cb973bbcf64-7
Document(page_content='mdd_field_57\nmdd_field_58\nmdd_field_59\nmdd_field_60\nmdd_field_61\nmdd_field_62\nmdd_field_63\nmdd_field_64\nmdd_field_65\nmdd_field_66\nmdd_field_67\nmdd_field_68\nmdd_field_69\nmdd_field_70\nmdd_field_71\nmdd_field_72\nmdd_field_73\nmdd_field_74\nmdd_field_75\nmdd_field_76\nmdd_field_77\nmdd_field_78\nmdd_field_79\nmdd_field_80\nmdd_field_81\nmdd_field_82\nmdd_field_83\nmdd_field_84\nmdd_field_85\nmdd_field_86\nmdd_field_87\nmdd_field_88\nmdd_field_89\nmdd_field_90\nmdd_field_91\nmdd_field_92\nmdd_field_93\nmdd_field_94\nmdd_field_95\nmdd_field_96\nmdd_field_97\nmdd_field_98\nmdd_field_99\nmdd_field_100\nsupported_countries: US\nAE\nBR\nCA\nCN\nDK\nFI\nFR\nDE\nIN\nJP\nMX\nNO\nSE\nGB\nSG\nLB\nPK\nsupported_cardtypes: visa\nmaster\namerican_express\ndiscover\ndiners_club\njcb\nmaestro\nelo\nunion_pay\ncartes_bancaires\nmada\nregions: asia_pacific\neurope\nlatin_america\nnorth_america\nhomepage: http://www.cybersource.com\ndisplay_api_url: https://api.cybersource.com\ncompany_name: CyberSource REST',
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/spreedly.html
9cb973bbcf64-8
ERROR: type should be string, got "https://api.cybersource.com\\ncompany_name: CyberSource REST', metadata={'source': 'https://core.spreedly.com/v1/gateways_options.json'})]"
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/spreedly.html
9cb973bbcf64-9
previous Snowflake next Stripe By Harrison Chase ยฉ Copyright 2023, Harrison Chase. Last updated on Jun 11, 2023.
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/spreedly.html
8acf064525be-0
.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# Create a Google Cloud project or use an existing project Enable the Google Drive API Authorize credentials for desktop app pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib ๐Ÿง‘ Instructions for ingesting your Google Docs data# By default, the GoogleDriveLoader expects the credentials.json file to be ~/.credentials/credentials.json, but this is configurable using the credentials_path keyword argument. Same thing with token.json - token_path. Note that token.json will be created automatically the first time you use the loader. GoogleDriveLoader can load from a list of Google Docs document ids or a folder id. You can obtain your folder and document id from the URL: Folder: https://drive.google.com/drive/u/0/folders/1yucgL9WGgWZdM1TOuKkeghlPizuzMYb5 -> folder id is "1yucgL9WGgWZdM1TOuKkeghlPizuzMYb5" Document: https://docs.google.com/document/d/1bfaMQ18_i56204VaQDVeAFpqEijJTgvurupdEDiaUQw/edit -> document id is "1bfaMQ18_i56204VaQDVeAFpqEijJTgvurupdEDiaUQw" !pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib from langchain.document_loaders import GoogleDriveLoader loader = GoogleDriveLoader(
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/google_drive.html
8acf064525be-1
from langchain.document_loaders import GoogleDriveLoader loader = GoogleDriveLoader( 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 file_types argument loader = GoogleDriveLoader( folder_id="1yucgL9WGgWZdM1TOuKkeghlPizuzMYb5", file_types=["document", "sheet"] recursive=False ) previous Google Cloud Storage File next Image captions Contents Prerequisites ๐Ÿง‘ Instructions for ingesting your Google Docs data By Harrison Chase ยฉ Copyright 2023, Harrison Chase. Last updated on Jun 11, 2023.
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/google_drive.html
15cc67e8df6a-0
.ipynb .pdf Markdown Contents Retain Elements Markdown# Markdown is a lightweight markup language for creating formatted text using a plain-text editor. This covers how to load markdown documents into a document format that we can use downstream. # !pip install unstructured > /dev/null from langchain.document_loaders import UnstructuredMarkdownLoader markdown_path = "../../../../../README.md" loader = UnstructuredMarkdownLoader(markdown_path) data = loader.load() data
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/markdown.html
15cc67e8df6a-1
[Document(page_content="รฐ\x9fยฆ\x9cรฏยธ\x8fรฐ\x9fโ€\x97 LangChain\n\nรข\x9aยก Building applications with LLMs through composability รข\x9aยก\n\nLooking for the JS/TS version? Check out LangChain.js.\n\nProduction Support: As you move your LangChains into production, we'd love to offer more comprehensive support.\nPlease fill out this form and we'll set up a dedicated support Slack channel.\n\nQuick Install\n\npip install langchain\nor\nconda install langchain -c conda-forge\n\nรฐ\x9fยคโ€ What is this?\n\nLarge language models (LLMs) are emerging as a transformative technology, enabling developers to build applications that they previously could not. However, using these LLMs in isolation is often insufficient for creating a truly powerful app - the real power comes when you can combine them with other sources of computation or knowledge.\n\nThis library aims to assist in the development of those types of applications. Common examples of these applications include:\n\nรข\x9dโ€œ Question Answering over specific documents\n\nDocumentation\n\nEnd-to-end Example: Question Answering over Notion Database\n\nรฐ\x9fโ€™ยฌ Chatbots\n\nDocumentation\n\nEnd-to-end Example: Chat-LangChain\n\nรฐ\x9fยค\x96 Agents\n\nDocumentation\n\nEnd-to-end Example: GPT+WolframAlpha\n\nรฐ\x9fโ€œ\x96 Documentation\n\nPlease see here for full documentation on:\n\nGetting started (installation, setting up the environment, simple examples)\n\nHow-To examples (demos, integrations, helper functions)\n\nReference (full API docs)\n\nResources (high-level explanation of core concepts)\n\nรฐ\x9f\x9a\x80 What can this help
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/markdown.html
15cc67e8df6a-2
explanation of core concepts)\n\nรฐ\x9f\x9a\x80 What can this help with?\n\nThere are six main areas that LangChain is designed to help with.\nThese are, in increasing order of complexity:\n\nรฐ\x9fโ€œ\x83 LLMs and Prompts:\n\nThis includes prompt management, prompt optimization, a generic interface for all LLMs, and common utilities for working with LLMs.\n\nรฐ\x9fโ€\x97 Chains:\n\nChains go beyond a single LLM call and involve sequences of calls (whether to an LLM or a different utility). LangChain provides a standard interface for chains, lots of integrations with other tools, and end-to-end chains for common applications.\n\nรฐ\x9fโ€œ\x9a Data Augmented Generation:\n\nData Augmented Generation involves specific types of chains that first interact with an external data source to fetch data for use in the generation step. Examples include summarization of long pieces of text and question/answering over specific data sources.\n\nรฐ\x9fยค\x96 Agents:\n\nAgents involve an LLM making decisions about which Actions to take, taking that Action, seeing an Observation, and repeating that until done. LangChain provides a standard interface for agents, a selection of agents to choose from, and examples of end-to-end agents.\n\nรฐ\x9fยง\xa0 Memory:\n\nMemory refers to 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.\n\nรฐ\x9fยง\x90 Evaluation:\n\n[BETA] Generative models are notoriously hard to evaluate with traditional metrics. One new way of evaluating them is using language models themselves to do the evaluation. LangChain provides some prompts/chains for assisting in
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/markdown.html
15cc67e8df6a-3
is using language models themselves to do the evaluation. LangChain provides some prompts/chains for assisting in this.\n\nFor more information on these concepts, please see our full documentation.\n\nรฐ\x9fโ€™\x81 Contributing\n\nAs an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.\n\nFor detailed information on how to contribute, see here.", metadata={'source': '../../../../../README.md'})]
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/markdown.html
15cc67e8df6a-4
Retain Elements# Under the hood, Unstructured creates different โ€œelementsโ€ for different chunks of text. By default we combine those together, but you can easily keep that separation by specifying mode="elements". loader = UnstructuredMarkdownLoader(markdown_path, mode="elements") data = loader.load() data[0] Document(page_content='รฐ\x9fยฆ\x9cรฏยธ\x8fรฐ\x9fโ€\x97 LangChain', metadata={'source': '../../../../../README.md', 'page_number': 1, 'category': 'Title'}) previous JSON next Microsoft PowerPoint Contents Retain Elements By Harrison Chase ยฉ Copyright 2023, Harrison Chase. Last updated on Jun 11, 2023.
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/markdown.html
728c3dfe41fb-0
.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 LangChain, along with example usage for vectorization. import os from langchain.document_loaders import IuguLoader from langchain.indexes import VectorstoreIndexCreator The Iugu API requires an access token, which can be found inside of the Iugu dashboard. This document loader also requires a resource option which defines what data you want to load. Following resources are available: Documentation Documentation iugu_loader = IuguLoader("charges") # Create a vectorstore retriver from the loader # see https://python.langchain.com/en/latest/modules/indexes/getting_started.html for more details index = VectorstoreIndexCreator().from_loaders([iugu_loader]) iugu_doc_retriever = index.vectorstore.as_retriever() previous Image captions next Joplin By Harrison Chase ยฉ Copyright 2023, Harrison Chase. Last updated on Jun 11, 2023.
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/iugu.html
95611e8b5e3b-0
.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 for loading webpages look at some child class examples such as IMSDbLoader, AZLyricsLoader, and CollegeConfidentialLoader from langchain.document_loaders import WebBaseLoader loader = WebBaseLoader("https://www.espn.com/") data = loader.load() data
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html
95611e8b5e3b-1
[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 Skip to navigation\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<\n\n>\n\n\n\n\n\n\n\n\n\nMenuESPN\n\n\nSearch\n\n\n\nscores\n\n\n\nNFLNBANCAAMNCAAWNHLSoccerโ€ฆMLBNCAAFGolfTennisSports BettingBoxingCFLNCAACricketF1HorseLLWSMMANASCARNBA G LeagueOlympic SportsRacingRN BBRN FBRugbyWNBAWorld Baseball ClassicWWEX GamesXFLMore ESPNFantasyListenWatchESPN+\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n\nSUBSCRIBE NOW\n\n\n\n\n\nNHL: Select Games\n\n\n\n\n\n\n\nXFL\n\n\n\n\n\n\n\nMLB: Select Games\n\n\n\n\n\n\n\nNCAA Baseball\n\n\n\n\n\n\n\nNCAA Softball\n\n\n\n\n\n\n\nCricket: Select Matches\n\n\n\n\n\n\n\nMel Kiper's NFL
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html
95611e8b5e3b-2
Select Matches\n\n\n\n\n\n\n\nMel Kiper's NFL 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 \n\n\n\nCustomize ESPNSign UpLog InESPN Sites\n\n\n\n\nESPN Deportes\n\n\n\n\n\n\n\nAndscape\n\n\n\n\n\n\n\nespnW\n\n\n\n\n\n\n\nESPNFC\n\n\n\n\n\n\n\nX Games\n\n\n\n\n\n\n\nSEC 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\nAre you ready for Opening Day? Here's your guide to MLB's offseason chaosWait, Jacob deGrom is on the Rangers now? Xander Bogaerts and Trea Turner signed where? And what about Carlos Correa? Yeah, you're going to need to read up before Opening Day.12hESPNIllustration by ESPNEverything you missed in the MLB offseason3h2:33World Series odds, win totals, props for every teamPlay fantasy baseball for free!TOP HEADLINESQB Jackson has requested trade from RavensSources: Texas
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html
95611e8b5e3b-3
fantasy baseball for free!TOP HEADLINESQB Jackson has requested trade from RavensSources: Texas hiring Terry as full-time coachJets GM: No rush on Rodgers; Lamar 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 BALTIMOREMarcus Spears identifies the two teams that need Lamar Jackson the most8h2:00Would Lamar sit out? Will Ravens draft a QB? Jackson trade request insightsLamar Jackson has asked Baltimore to trade him, but Ravens coach John Harbaugh hopes the QB will be back.3hJamison HensleyBallard, Colts will consider trading for QB JacksonJackson to Indy? Washington? Barnwell ranks the QB's trade fitsSNYDER'S TUMULTUOUS 24-YEAR RUNHow Washingtonโ€™s NFL franchise sank on and off the field under owner Dan SnyderSnyder purchased one of the NFL's marquee franchises in 1999. Twenty-four years later, and with the team up for sale, he leaves a legacy of on-field futility and off-field scandal.13hJohn KeimESPNIOWA STAR STEPS UP AGAINJ-Will: Caitlin Clark is the biggest brand in college sports right now8h0:47'The better the opponent, the better she plays': Clark draws comparisons to TaurasiCaitlin Clark's performance on Sunday had longtime observers going back decades to find comparisons.16hKevin PeltonWOMEN'S ELITE EIGHT SCOREBOARDMONDAY'S GAMESCheck your bracket!NBA DRAFTHow top prospects fared on the road to the Final FourThe 2023 NCAA tournament is down to four
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html
95611e8b5e3b-4
prospects fared on the road to the Final FourThe 2023 NCAA tournament is down to four teams, and ESPN's Jonathan Givony recaps the players who saw their NBA draft stock change.11hJonathan GivonyAndy Lyons/Getty ImagesTALKING 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 which teams have taken a hit?12hNFL Nation reportersIllustration by ESPNTHE BUCK STOPS WITH BELICHICKBruschi: Fair to criticize Bill Belichick for Patriots' struggles10h1:27 Top HeadlinesQB Jackson has requested trade from RavensSources: Texas hiring Terry as full-time coachJets GM: No rush on Rodgers; Lamar 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 DodgersFavorites FantasyManage FavoritesFantasy HomeCustomize ESPNSign UpLog InMarch Madness LiveESPNMarch Madness LiveWatch every men's NCAA tournament game live! ICYMI1:42Austin Peay's coach, pitcher and catcher all ejected after retaliation pitchAustin Peay's pitcher, catcher and coach were all ejected after a pitch was thrown at Liberty's Nathan Keeter, who earlier in the game hit a home run and celebrated while running down the third-base line. Men's Tournament ChallengeIllustration by ESPNMen's Tournament ChallengeCheck your bracket(s) in the
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html
95611e8b5e3b-5
Men's Tournament ChallengeIllustration by ESPNMen's Tournament ChallengeCheck your bracket(s) in the 2023 Men's Tournament Challenge, which you can follow throughout the Big Dance. Women's Tournament ChallengeIllustration by ESPNWomen's Tournament ChallengeCheck your bracket(s) in the 2023 Women's Tournament Challenge, which you can follow throughout the Big Dance. Best 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: Bold predictions and moreOpening Day is just over a week away -- and Jeff Passan has everything you need to know covered from every possible angle.Photo by Bob Kupbens/Icon Sportswire2023 NFL free agency: Best team fits for unsigned playersWhere could Ezekiel Elliott land? Let's match remaining free agents to teams and find fits for two trade candidates.Illustration by ESPN2023 NFL mock draft: Mel Kiper's first-round pick predictionsMel Kiper Jr. makes his predictions for Round 1 of the NFL draft, including projecting a trade in the top five. Trending NowAnne-Marie Sorvin-USA TODAY SBoston Bruins record tracker: Wins, points, milestonesThe B's are on pace for NHL records in wins and points, along with some individual superlatives as well. Follow along here with our updated tracker.Mandatory Credit: William Purnell-USA TODAY Sports2023 NFL full draft order: AFC, NFC team picks for all roundsStarting with the Carolina Panthers at No. 1 overall, here's the entire 2023 NFL draft broken down round by round. How to Watch on ESPN+Gregory Fisher/Icon Sportswire2023 NCAA men's hockey: Results,
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html
95611e8b5e3b-6
Watch on ESPN+Gregory Fisher/Icon Sportswire2023 NCAA men's hockey: Results, bracket, how to watchThe matchups in Tampa promise to be thrillers, featuring plenty of star power, high-octane offense and stellar defense.(AP Photo/Koji Sasahara, File)How to watch the PGA Tour, Masters, PGA Championship and FedEx Cup playoffs on ESPN, ESPN+Here's everything you need to know about how to watch the PGA 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 LeagueCreate A LeagueJoin a Public LeaguePractice With a Mock DraftSports BettingAP Photo/Mike KropfMarch Madness betting 2023: Bracket odds, lines, tips, moreThe 2023 NCAA tournament brackets have finally been released, and we have everything you need to know to make a bet on all of the March Madness games. Sign up to play the #1 Fantasy game!Create A LeagueJoin Public LeagueReactivateMock Draft Now\n\nESPN+\n\n\n\n\nNHL: Select Games\n\n\n\n\n\n\n\nXFL\n\n\n\n\n\n\n\nMLB: Select Games\n\n\n\n\n\n\n\nNCAA Baseball\n\n\n\n\n\n\n\nNCAA Softball\n\n\n\n\n\n\n\nCricket: Select Matches\n\n\n\n\n\n\n\nMel Kiper's NFL 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
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html
95611e8b5e3b-7
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\nESPN Sites\n\n\n\n\nESPN Deportes\n\n\n\n\n\n\n\nAndscape\n\n\n\n\n\n\n\nespnW\n\n\n\n\n\n\n\nESPNFC\n\n\n\n\n\n\n\nX Games\n\n\n\n\n\n\n\nSEC 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 PolicyInterest-Based AdsAbout Nielsen MeasurementDo Not Sell or Share My Personal InformationContact UsDisney Ad Sales SiteWork for ESPNCopyright: ยฉ ESPN Enterprises, Inc. All rights reserved.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", lookup_str='', metadata={'source': 'https://www.espn.com/'}, lookup_index=0)]
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html
95611e8b5e3b-8
""" # 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 = soup.select_one("td[class='scrtext']").text # BS4 documentation can be found here: https://www.crummy.com/software/BeautifulSoup/bs4/doc/ """; Loading multiple webpages# You can also load multiple webpages at once by passing in a list of urls to the loader. This will return a list of documents in the same order as the urls passed in. loader = WebBaseLoader(["https://www.espn.com/", "https://google.com"]) docs = loader.load() docs
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/web_base.html