id stringlengths 14 16 | text stringlengths 36 2.73k | source stringlengths 49 117 |
|---|---|---|
3fae15f88608-18 | Document(page_content="24. SIGNS . No signage shall be placed by Tenant on any portion of the Project . However, Tenant shall be permitted to place a sign bearing its name in a location approved by Landlord near the entrance to the Premises (at Tenant's cost ) and will be furnished a single listing of its nam... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/docugami.html |
3fae15f88608-19 | Using Docugami to Add Metadata to Chunks for High Accuracy Document QA#
One issue with large documents is that the correct answer to your question may depend on chunks that are far apart in the document. Typical chunking techniques, even with overlap, will struggle with providing the LLM sufficent context to answer suc... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/docugami.html |
3fae15f88608-20 | chain_response["source_documents"]
[Document(page_content='1.1 Landlord . DHA Group , a Delaware limited liability company authorized to transact business in New Jersey .', metadata={'xpath': '/docset:OFFICELEASE-section/docset:OFFICELEASE/docset:THISOFFICELEASE/docset:WITNESSETH-section/docset:WITNESSETH/docset:Th... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/docugami.html |
3fae15f88608-21 | Document(page_content='WITNESSES: LANDLORD: DHA Group , a Delaware limited liability company', metadata={'xpath': '/docset:OFFICELEASE-section/docset:OFFICELEASE/docset:THISOFFICELEASE/docset:WITNESSETH-section/docset:WITNESSETH/docset:GrossRentCreditTheRentCredit-section/docset:GrossRentCreditTheRentCredit/docset:Gu... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/docugami.html |
3fae15f88608-22 | Document(page_content="1.16 Landlord 's Notice Address . DHA Group , Suite 1010 , 111 Bauer Dr , Oakland , New Jersey , 07436 , with a copy to the Building Management Office at the Project , Attention: On - Site Property Manager .", metadata={'xpath': '/docset:OFFICELEASE-section/docset:OFFICELEASE/docset... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/docugami.html |
3fae15f88608-23 | Document(page_content='1.6 Rentable Area of the Premises. 9,753 square feet . This square footage figure includes an add-on factor for Common Areas in the Building and has been agreed upon by the parties as final and correct and is not subject to challenge or dispute by either party.', metadata={'xpath': '/docset:O... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/docugami.html |
3fae15f88608-24 | 'id': 'v1bvgaozfkak',
'name': 'TruTone Lane 2.docx',
'structure': 'p',
'tag': 'ThisOfficeLeaseAgreement',
'Landlord': 'BUBBA CENTER PARTNERSHIP',
'Tenant': 'Truetone Lane LLC'}
We can use a self-querying retriever to improve our query accuracy, using this additional metadata:
from langchain.chains.query_constructo... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/docugami.html |
3fae15f88608-25 | qa_chain("What is rentable area for the property owned by DHA Group?")
query='rentable area' filter=Comparison(comparator=<Comparator.EQ: 'eq'>, attribute='Landlord', value='DHA Group')
{'query': 'What is rentable area for the property owned by DHA Group?',
'result': ' 13,500 square feet.',
'source_documents': [Docum... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/docugami.html |
3fae15f88608-26 | Document(page_content='WITNESSES: LANDLORD: DHA Group , a Delaware limited liability company', metadata={'xpath': '/docset:OFFICELEASE-section/docset:OFFICELEASE/docset:THISOFFICELEASE/docset:WITNESSETH-section/docset:WITNESSETH/docset:GrossRentCreditTheRentCredit-section/docset:GrossRentCreditTheRentCredit/docset:Gu... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/docugami.html |
3fae15f88608-27 | Document(page_content="1.16 Landlord 's Notice Address . DHA Group , Suite 1010 , 111 Bauer Dr , Oakland , New Jersey , 07436 , with a copy to the Building Management Office at the Project , Attention: On - Site Property Manager .", metadata={'xpath': '/docset:OFFICELEASE-section/docset:OFFICELEASE/docset... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/docugami.html |
3fae15f88608-28 | Document(page_content='1.6 Rentable Area of the Premises. 13,500 square feet . This square footage figure includes an add-on factor for Common Areas in the Building and has been agreed upon by the parties as final and correct and is not subject to challenge or dispute by either party.', metadata={'xpath': '/docset:... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/docugami.html |
3fae15f88608-29 | By Harrison Chase
© Copyright 2023, Harrison Chase.
Last updated on May 28, 2023. | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/docugami.html |
eedf2cbd101d-0 | .ipynb
.pdf
Notion DB 2/2
Contents
Requirements
Setup
1. Create a Notion Table Database
2. Create a Notion Integration
3. Connect the Integration to the Database
4. Get the Database ID
Usage
Notion DB 2/2#
Notion is a collaboration platform with modified Markdown support that integrates kanban boards, tasks, wikis an... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/notiondb.html |
eedf2cbd101d-1 | Click the “Submit” button to create the integration.
Once the integration is created, you’ll be provided with an Integration Token (API key). Copy this token and keep it safe, as you’ll need it to use the NotionDBLoader.
3. Connect the Integration to the Database#
To connect your integration to the database, follow the... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/notiondb.html |
eedf2cbd101d-2 | ········
from langchain.document_loaders import NotionDBLoader
loader = NotionDBLoader(
integration_token=NOTION_TOKEN,
database_id=DATABASE_ID,
request_timeout_sec=30 # optional, defaults to 10
)
docs = loader.load()
print(docs)
previous
Modern Treasury
next
Notion DB 1/2
Contents
Requirements
Setup
1... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/notiondb.html |
7f971f22524d-0 | .ipynb
.pdf
Psychic
Contents
Prerequisites
Loading documents
Converting the docs to embeddings
Psychic#
This notebook covers how to load documents from Psychic. See here for more details.
Prerequisites#
Follow the Quick Start section in this document
Log into the Psychic dashboard and get your secret key
Install the ... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/psychic.html |
7f971f22524d-1 | from langchain.vectorstores import Chroma
from langchain.text_splitter import CharacterTextSplitter
from langchain.llms import OpenAI
from langchain.chains import RetrievalQAWithSourcesChain
text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
texts = text_splitter.split_documents(documents)
embeddin... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/psychic.html |
2cd64848a00c-0 | .ipynb
.pdf
ChatGPT Data
ChatGPT Data#
ChatGPT is an artificial intelligence (AI) chatbot developed by OpenAI.
This notebook covers how to load conversations.json from your ChatGPT data export folder.
You can get your data export by email by going to: https://chat.openai.com/ -> (Profile) - Settings -> Export data -> C... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/chatgpt_loader.html |
736726e87688-0 | .ipynb
.pdf
HuggingFace dataset
Contents
Example
HuggingFace dataset#
The Hugging Face Hub is home to over 5,000 datasets in more than 100 languages that can be used for a broad range of tasks across NLP, Computer Vision, and Audio. They used for a diverse range of tasks such as translation,
automatic speech recognit... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/hugging_face_dataset.html |
736726e87688-1 | data = loader.load()
data[:15]
[Document(page_content='I rented I AM CURIOUS-YELLOW from my video store because of all the controversy that surrounded it when it was first released in 1967. I also heard that at first it was seized by U.S. customs if it ever tried to enter this country, therefore being a fan of films co... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/hugging_face_dataset.html |
736726e87688-2 | Document(page_content='"I Am Curious: Yellow" is a risible and pretentious steaming pile. It doesn\'t matter what one\'s political views are because this film can hardly be taken seriously on any level. As for the claim that frontal male nudity is an automatic NC-17, that isn\'t true. I\'ve seen R-rated films with male... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/hugging_face_dataset.html |
736726e87688-3 | Document(page_content="If only to avoid making this type of film in the future. This film is interesting as an experiment but tells no cogent story.<br /><br />One might feel virtuous for sitting thru it because it touches on so many IMPORTANT issues but it does so without any discernable motive. The viewer comes away ... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/hugging_face_dataset.html |
736726e87688-4 | Document(page_content='Oh, brother...after hearing about this ridiculous film for umpteen years all I can think of is that old Peggy Lee song..<br /><br />"Is that all there is??" ...I was just an early teen when this smoked fish hit the U.S. I was too young to get in the theater (although I did manage to sneak into "G... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/hugging_face_dataset.html |
736726e87688-5 | pretension...and feeble who-cares simulated sex scenes with saggy, pale actors.<br /><br />Cultural icon, holy grail, historic artifact..whatever this thing was, shred it, burn it, then stuff the ashes in a lead box!<br /><br />Elite esthetes still scrape to find value in its boring pseudo revolutionary political spewi... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/hugging_face_dataset.html |
736726e87688-6 | it - rent the video and fast forward to the "dirty" parts, just to get it over with.<br /><br />', metadata={'label': 0}), | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/hugging_face_dataset.html |
736726e87688-7 | Document(page_content="I would put this at the top of my list of films in the category of unwatchable trash! There are films that are bad, but the worst kind are the ones that are unwatchable but you are suppose to like them because they are supposed to be good for you! The sex sequences, so shocking in its day, couldn... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/hugging_face_dataset.html |
736726e87688-8 | Document(page_content='When I first saw a glimpse of this movie, I quickly noticed the actress who was playing the role of Lucille Ball. Rachel York\'s portrayal of Lucy is absolutely awful. Lucille Ball was an astounding comedian with incredible talent. To think about a legend like Lucille Ball being portrayed the way... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/hugging_face_dataset.html |
736726e87688-9 | Document(page_content='Who are these "They"- the actors? the filmmakers? Certainly couldn\'t be the audience- this is among the most air-puffed productions in existence. It\'s the kind of movie that looks like it was a lot of fun to shoot\x97 TOO much fun, nobody is getting any actual work done, and that almost always ... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/hugging_face_dataset.html |
736726e87688-10 | respective children (nepotism alert: Bogdanovich\'s daughters) spew cute and pick up some fairly disturbing pointers on \'love\' while observing their parents. (Ms. Hepburn, drawing on her dignity, manages to rise above the proceedings- but she has the monumental challenge of playing herself, ostensibly.) Everybody loo... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/hugging_face_dataset.html |
736726e87688-11 | but at least they were long on charm. "They All Laughed" tries to coast on its good intentions, but nobody- least of all Peter Bogdanovich - has the good sense to put on the brakes.<br /><br />Due in no small part to the tragic death of Dorothy Stratten, this movie has a special place in the heart of Mr. Bogdanovich- h... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/hugging_face_dataset.html |
736726e87688-12 | in all, though, the movie is harmless, only a waste of rental. I want to watch people having a good time, I\'ll go to the park on a sunny day. For filmic expressions of joy and love, I\'ll stick to Ernest Lubitsch and Jaques Demy...', metadata={'label': 0}), | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/hugging_face_dataset.html |
736726e87688-13 | Document(page_content="This is said to be a personal film for Peter Bogdonavitch. He based it on his life but changed things around to fit the characters, who are detectives. These detectives date beautiful models and have no problem getting them. Sounds more like a millionaire playboy filmmaker than a detective, doesn... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/hugging_face_dataset.html |
736726e87688-14 | Document(page_content='It was great to see some of my favorite stars of 30 years ago including John Ritter, Ben Gazarra and Audrey Hepburn. They looked quite wonderful. But that was it. They were not given any characters or good lines to work with. I neither understood or cared what the characters were doing.<br /><br ... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/hugging_face_dataset.html |
736726e87688-15 | Document(page_content="I can't believe that those praising this movie herein aren't thinking of some other film. I was prepared for the possibility that this would be awful, but the script (or lack thereof) makes for a film that's also pointless. On the plus side, the general level of craft on the part of the actors an... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/hugging_face_dataset.html |
736726e87688-16 | Document(page_content="Its not the cast. A finer group of actors, you could not find. Its not the setting. The director is in love with New York City, and by the end of the film, so are we all! Woody Allen could not improve upon what Bogdonovich has done here. If you are going to fall in love, or find love, Manhattan i... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/hugging_face_dataset.html |
736726e87688-17 | Document(page_content='Today I found "They All Laughed" on VHS on sale in a rental. It was a really old and very used VHS, I had no information about this movie, but I liked the references listed on its cover: the names of Peter Bogdanovich, Audrey Hepburn, John Ritter and specially Dorothy Stratten attracted me, the p... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/hugging_face_dataset.html |
736726e87688-18 | eyes who fall in love for the women they are chasing), but I have not laughed along the whole story. The coincidences, in a huge city like New York, are ridiculous. Ben Gazarra as an attractive and very seductive man, with the women falling for him as if her were a Brad Pitt, Antonio Banderas or George Clooney, is quit... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/hugging_face_dataset.html |
736726e87688-19 | most popular Brazilian singer since the end of the 60\'s and is called by his fans as "The King". I will keep this movie in my collection only because of these attractions (manly Dorothy Stratten). My vote is four.<br /><br />Title (Brazil): "Muito Riso e Muita Alegria" ("Many Laughs and Lots of Happiness")', metadata=... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/hugging_face_dataset.html |
736726e87688-20 | Example#
In this example, we use data from a dataset to answer a question
from langchain.indexes import VectorstoreIndexCreator
from langchain.document_loaders.hugging_face_dataset import HuggingFaceDatasetLoader
dataset_name="tweet_eval"
page_content_column="text"
name="stance_climate"
loader=HuggingFaceDatasetLoader(... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/hugging_face_dataset.html |
23549dec4c59-0 | .ipynb
.pdf
2Markdown
2Markdown#
2markdown service transforms website content into structured markdown files.
# You will need to get your own API key. See https://2markdown.com/login
api_key = ""
from langchain.document_loaders import ToMarkdownLoader
loader = ToMarkdownLoader.from_api_key(url="https://python.langchain... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/tomarkdown.html |
23549dec4c59-1 | Concepts and terminology.
- [Concepts and terminology](https://python.langchain.com/en/latest/getting_started/concepts.html)
Tutorials created by community experts and presented on YouTube.
- [Tutorials](https://python.langchain.com/en/latest/getting_started/tutorials.html)
## Modules [\#](\#modules "Permalink to this ... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/tomarkdown.html |
23549dec4c59-2 | - [Callbacks](https://python.langchain.com/en/latest/modules/callbacks/getting_started.html): Callbacks let you log and stream the intermediate steps of any chain, making it easy to observe, debug, and evaluate the internals of an application.
## Use Cases [\#](\#use-cases "Permalink to this headline")
Best practices a... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/tomarkdown.html |
23549dec4c59-3 | - [Code Understanding](https://python.langchain.com/en/latest/use_cases/code.html): Recommended reading if you want to use language models to analyze code.
- [Interacting with APIs](https://python.langchain.com/en/latest/use_cases/apis.html): Enabling language models to interact with APIs is extremely powerful. It give... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/tomarkdown.html |
23549dec4c59-4 | - [Gallery](https://python.langchain.com/en/latest/additional_resources/gallery.html): A collection of our favorite projects that use LangChain. Useful for finding inspiration or seeing how things were done in other applications.
- [Deployments](https://python.langchain.com/en/latest/additional_resources/deployments.ht... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/tomarkdown.html |
afce712b128f-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 a... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/joplin.html |
d4442713e8b1-0 | .ipynb
.pdf
CoNLL-U
CoNLL-U#
CoNLL-U is revised version of the CoNLL-X format. Annotations are encoded in plain text files (UTF-8, normalized to NFC, using only the LF character as line break, including an LF character at the end of file) with three types of lines:
Word lines containing the annotation of a word/token i... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/conll-u.html |
c6bc31f3c772-0 | .ipynb
.pdf
Image captions
Contents
Prepare a list of image urls from Wikimedia
Create the loader
Create the index
Query
Image captions#
By default, the loader utilizes the pre-trained Salesforce BLIP image captioning model.
This notebook shows how to use the ImageCaptionLoader to generate a query-able index of image... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/image_captions.html |
c6bc31f3c772-1 | 'https://upload.wikimedia.org/wikipedia/commons/thumb/5/5e/Messier83_-_Heic1403a.jpg/277px-Messier83_-_Heic1403a.jpg',
'https://upload.wikimedia.org/wikipedia/commons/thumb/b/b6/2022-01-22_Men%27s_World_Cup_at_2021-22_St._Moritz%E2%80%93Celerina_Luge_World_Cup_and_European_Championships_by_Sandro_Halank%E2%80%93257... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/image_captions.html |
c6bc31f3c772-2 | warnings.warn(
[Document(page_content='an image of a frog on a flower [SEP]', metadata={'image_path': 'https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/Hyla_japonica_sep01.jpg/260px-Hyla_japonica_sep01.jpg'}),
Document(page_content='an image of a shark swimming in the ocean [SEP]', metadata={'image_path': 'ht... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/image_captions.html |
c6bc31f3c772-3 | Document(page_content='an image of the spiral galaxy [SEP]', metadata={'image_path': 'https://upload.wikimedia.org/wikipedia/commons/thumb/5/5e/Messier83_-_Heic1403a.jpg/277px-Messier83_-_Heic1403a.jpg'}),
Document(page_content='an image of a man on skis in the snow [SEP]', metadata={'image_path': 'https://upload.wiki... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/image_captions.html |
c6bc31f3c772-4 | index = VectorstoreIndexCreator().from_loaders([loader])
/Users/saitosean/dev/langchain/.venv/lib/python3.10/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
from .autonotebook import tqdm as notebo... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/image_captions.html |
8545c74fa9c0-0 | .ipynb
.pdf
Jupyter Notebook
Jupyter Notebook#
Jupyter Notebook (formerly IPython Notebook) is a web-based interactive computational environment for creating notebook documents.
This notebook covers how to load data from a Jupyter notebook (.ipynb) into a format suitable by LangChain.
from langchain.document_loaders im... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/jupyter_notebook.html |
8545c74fa9c0-1 | traceback (bool): whether to include full traceback (default is False).
loader.load()
[Document(page_content='\'markdown\' cell: \'[\'# Notebook\', \'\', \'This notebook covers how to load data from an .ipynb notebook into a format suitable by LangChain.\']\'\n\n \'code\' cell: \'[\'from langchain.document_loaders impo... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/jupyter_notebook.html |
15f8f86e459f-0 | .ipynb
.pdf
Hacker News
Hacker News#
Hacker News (sometimes abbreviated as HN) is a social news website focusing on computer science and entrepreneurship. It is run by the investment fund and startup incubator Y Combinator. In general, content that can be submitted is defined as “anything that gratifies one’s intellect... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/hacker_news.html |
1462f38a0669-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... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/markdown.html |
1462f38a0669-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 ou... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/markdown.html |
1462f38a0669-2 | 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... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/markdown.html |
1462f38a0669-3 | 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 summar... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/markdown.html |
1462f38a0669-4 | One new way of evaluating them 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 a... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/markdown.html |
1462f38a0669-5 | 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(... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/markdown.html |
d2d7777bd0b8-0 | .ipynb
.pdf
Subtitle
Subtitle#
The SubRip file format is described on the Matroska multimedia container format website as “perhaps the most basic of all subtitle formats.” SubRip (SubRip Text) files are named with the extension .srt, and contain formatted lines of plain text in groups separated by a blank line. Subtitl... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/subtitle.html |
11fe3044a5b7-0 | .ipynb
.pdf
Apify Dataset
Contents
Prerequisites
An example with question answering
Apify Dataset#
Apify Dataset is a scaleable append-only storage with sequential access built for storing structured web scraping results, such as a list of products or Google SERPs, and then export them to various formats like JSON, C... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/apify_dataset.html |
11fe3044a5b7-1 | In this example, we use data from a dataset to answer a question.
from langchain.docstore.document import Document
from langchain.document_loaders import ApifyDatasetLoader
from langchain.indexes import VectorstoreIndexCreator
loader = ApifyDatasetLoader(
dataset_id="your-dataset-id",
dataset_mapping_function=l... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/apify_dataset.html |
49f8db7f1946-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 Media... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/mediawikidump.html |
49f8db7f1946-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|-\... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/mediawikidump.html |
49f8db7f1946-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 ... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/mediawikidump.html |
49f8db7f1946-3 | 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 documenta... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/mediawikidump.html |
49f8db7f1946-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:Tem... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/mediawikidump.html |
dfd9fc74bd25-0 | .ipynb
.pdf
Facebook Chat
Facebook Chat#
Messenger is an American proprietary instant messaging app and platform developed by Meta Platforms. Originally developed as Facebook Chat in 2008, the company revamped its messaging service in 2010.
This notebook covers how to load data from the Facebook Chats into a format tha... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/facebook_chat.html |
dfd9fc74bd25-1 | loader = FacebookChatLoader("example_data/facebook_chat.json")
loader.load()
[Document(page_content='User 2 on 2023-02-05 03:46:11: Bye!\n\nUser 1 on 2023-02-05 03:43:55: Oh no worries! Bye\n\nUser 2 on 2023-02-05 03:24:37: No Im sorry it was my mistake, the blue one is not for sale\n\nUser 1 on 2023-02-05 03:05:40: I ... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/facebook_chat.html |
f8e2c836a2d7-0 | .ipynb
.pdf
GitBook
Contents
Load from single GitBook page
Load from all paths in a given GitBook
GitBook#
GitBook is a modern documentation platform where teams can document everything from products to internal knowledge bases and APIs.
This notebook shows how to pull page data from any GitBook.
from langchain.docum... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/gitbook.html |
f8e2c836a2d7-1 | loader = GitbookLoader("https://docs.gitbook.com", load_all_paths=True)
all_pages_data = loader.load()
Fetching text from https://docs.gitbook.com/
Fetching text from https://docs.gitbook.com/getting-started/overview
Fetching text from https://docs.gitbook.com/getting-started/import
Fetching text from https://docs.gitb... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/gitbook.html |
f8e2c836a2d7-2 | Fetching text from https://docs.gitbook.com/troubleshooting/faqs
Fetching text from https://docs.gitbook.com/troubleshooting/hard-refresh
Fetching text from https://docs.gitbook.com/troubleshooting/report-bugs
Fetching text from https://docs.gitbook.com/troubleshooting/connectivity-issues
Fetching text from https://doc... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/gitbook.html |
f8e2c836a2d7-3 | Document(page_content="Import\nFind out how to easily migrate your existing documentation and which formats are supported.\nThe import function allows you to migrate and unify existing documentation in GitBook. You can choose to import single or multiple pages although limits apply. \nPermissions\nAll members with edit... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/gitbook.html |
f8e2c836a2d7-4 | in the page action menu, found in the table of contents:\nImport from the page action menu\nWhen you choose your input source, instructions will explain how to proceed.\nAlthough GitBook supports importing content from different kinds of sources, the end result might be different from your source due to differences in ... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/gitbook.html |
f8e2c836a2d7-5 | previous
Figma
next
Git
Contents
Load from single GitBook page
Load from all paths in a given GitBook
By Harrison Chase
© Copyright 2023, Harrison Chase.
Last updated on May 28, 2023. | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/gitbook.html |
efe64514a461-0 | .ipynb
.pdf
Blockchain
Contents
Overview
Load NFTs into Document Loader
Option 1: Ethereum Mainnet (default BlockchainType)
Option 2: Polygon Mainnet
Blockchain#
Overview#
The intention of this notebook is to provide a means of testing functionality in the Langchain Document Loader for Blockchain.
Initially this Load... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/blockchain.html |
efe64514a461-1 | nfts = blockchainLoader.load()
nfts[:2]
Option 2: Polygon Mainnet#
contractAddress = "0x448676ffCd0aDf2D85C1f0565e8dde6924A9A7D9" # Polygon Mainnet contract address
blockchainType = BlockchainType.POLYGON_MAINNET
blockchainLoader = BlockchainDocumentLoader(contract_address=contractAddress,
... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/blockchain.html |
c85da523c1a2-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. Paym... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/spreedly.html |
c85da523c1a2-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_remo... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/spreedly.html |
c85da523c1a2-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\nI... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/spreedly.html |
c85da523c1a2-3 | Z\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\nT... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/spreedly.html |
c85da523c1a2-4 | I\nVN\nVU\nWF\nWS\nYE\nYT\nZA\nZM\nsupported_cardtypes: | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/spreedly.html |
c85da523c1a2-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.sp... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/spreedly.html |
c85da523c1a2-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\nconfir... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/spreedly.html |
c85da523c1a2-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... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/spreedly.html |
c85da523c1a2-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 |
c85da523c1a2-9 | previous
Slack
next
Stripe
By Harrison Chase
© Copyright 2023, Harrison Chase.
Last updated on May 28, 2023. | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/spreedly.html |
17d33048bc73-0 | .ipynb
.pdf
Google BigQuery
Contents
Basic Usage
Specifying Which Columns are Content vs Metadata
Adding Source to Metadata
Google BigQuery#
Google BigQuery is a serverless and cost-effective enterprise data warehouse that works across clouds and scales with your data.
BigQuery is a part of the Google Cloud Platform.... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/google_bigquery.html |
17d33048bc73-1 | loader = BigQueryLoader(BASE_QUERY)
data = loader.load()
print(data)
[Document(page_content='id: 1\ndna_sequence: ATTCGA\norganism: Lokiarchaeum sp. (strain GC14_75).', lookup_str='', metadata={}, lookup_index=0), Document(page_content='id: 2\ndna_sequence: AGGCGA\norganism: Heimdallarchaeota archaeon (strain LC_2).', ... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/google_bigquery.html |
17d33048bc73-2 | id as source
FROM (
SELECT
ARRAY (
SELECT
AS STRUCT 1 AS id, "ATTCGA" AS dna_sequence, "Lokiarchaeum sp. (strain GC14_75)." AS organism
UNION ALL
SELECT
AS STRUCT 2 AS id, "AGGCGA" AS dna_sequence, "Heimdallarchaeota archaeon (strain LC_2)." AS organism
UNION ALL
SELECT
AS ST... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/google_bigquery.html |
17d33048bc73-3 | By Harrison Chase
© Copyright 2023, Harrison Chase.
Last updated on May 28, 2023. | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/google_bigquery.html |
85739dbde19d-0 | .ipynb
.pdf
Pandas DataFrame
Pandas DataFrame#
This notebook goes over how to load data from a pandas DataFrame.
#!pip install pandas
import pandas as pd
df = pd.read_csv('example_data/mlb_teams_2012.csv')
df.head()
Team
"Payroll (millions)"
"Wins"
0
Nationals
81.34
98
1
Reds
82.20
97
2
Yankees
197.96
95
3
Giants
117.6... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pandas_dataframe.html |
85739dbde19d-1 | 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={' ... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pandas_dataframe.html |
85739dbde19d-2 | 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=... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/pandas_dataframe.html |
759c7a849eb1-0 | .ipynb
.pdf
BiliBili
BiliBili#
Bilibili is one of the most beloved long-form video sites in China.
This loader utilizes the bilibili-api to fetch the text transcript from Bilibili.
With this BiliBiliLoader, users can easily obtain the transcript of their desired video content on the platform.
#!pip install bilibili-api... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/bilibili.html |
f3b8b93fc9b2-0 | .ipynb
.pdf
Arxiv
Contents
Installation
Examples
Arxiv#
arXiv is an open-access archive for 2 million scholarly articles in the fields of physics, mathematics, computer science, quantitative biology, quantitative finance, statistics, electrical engineering and systems science, and economics.
This notebook shows how t... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/arxiv.html |
f3b8b93fc9b2-1 | 'Authors': 'Caprice Stanley, Tobias Windisch',
'Summary': 'Graphs on lattice points are studied whose edges come from a finite set of\nallowed moves of arbitrary length. We show that the diameter of these graphs on\nfibers of a fixed integer matrix can be bounded from above by a constant. We\nthen study the mixing beh... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/arxiv.html |
a1d650696def-0 | .ipynb
.pdf
Unstructured File
Contents
Retain Elements
Define a Partitioning Strategy
PDF Example
Unstructured API
Unstructured File#
This notebook covers how to use Unstructured package to load files of many types. Unstructured currently supports loading of text files, powerpoints, html, pdfs, images, and more.
# # ... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/unstructured_file.html |
a1d650696def-1 | loader = UnstructuredFileLoader("./example_data/state_of_the_union.txt", mode="elements")
docs = loader.load()
docs[:5]
[Document(page_content='Madam Speaker, Madam Vice President, our First Lady and Second Gentleman. Members of Congress and the Cabinet. Justices of the Supreme Court. My fellow Americans.', lookup_str=... | https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/unstructured_file.html |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.