mirror of
https://github.com/hwchase17/langchain
synced 2024-11-10 01:10:59 +00:00
200 lines
21 KiB
Plaintext
200 lines
21 KiB
Plaintext
|
{
|
|||
|
"cells": [
|
|||
|
{
|
|||
|
"cell_type": "markdown",
|
|||
|
"source": [
|
|||
|
"# iFixit\n",
|
|||
|
"\n",
|
|||
|
"[iFixit](https://www.ifixit.com) is the largest, open repair community on the web. The site contains nearly 100k repair manuals, 200k Questions & Answers on 42k devices, and all the data is licensed under CC-BY-NC-SA 3.0.\n",
|
|||
|
"\n",
|
|||
|
"This loader will allow you to download the text of a repair guide, text of Q&A's and wikis from devices on iFixit using their open APIs. It's incredibly useful for context related to technical documents and answers to questions about devices in the corpus of data on iFixit."
|
|||
|
],
|
|||
|
"metadata": {
|
|||
|
"collapsed": false
|
|||
|
}
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 1,
|
|||
|
"metadata": {},
|
|||
|
"outputs": [],
|
|||
|
"source": [
|
|||
|
"from langchain.document_loaders import IFixitLoader"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 2,
|
|||
|
"metadata": {},
|
|||
|
"outputs": [],
|
|||
|
"source": [
|
|||
|
"loader = IFixitLoader(\"https://www.ifixit.com/Teardown/Banana+Teardown/811\")\n",
|
|||
|
"data = loader.load()"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 3,
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"data": {
|
|||
|
"text/plain": "[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)]"
|
|||
|
},
|
|||
|
"execution_count": 3,
|
|||
|
"metadata": {},
|
|||
|
"output_type": "execute_result"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"data"
|
|||
|
],
|
|||
|
"metadata": {
|
|||
|
"collapsed": false
|
|||
|
}
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 4,
|
|||
|
"outputs": [],
|
|||
|
"source": [
|
|||
|
"loader = IFixitLoader(\"https://www.ifixit.com/Answers/View/318583/My+iPhone+6+is+typing+and+opening+apps+by+itself\")\n",
|
|||
|
"data = loader.load()"
|
|||
|
],
|
|||
|
"metadata": {
|
|||
|
"collapsed": false
|
|||
|
}
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 5,
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"data": {
|
|||
|
"text/plain": "[Document(page_content='# My iPhone 6 is typing and opening apps by itself\\nmy iphone 6 is typing and opening apps by itself. How do i fix this. I just bought it last week.\\nI restored as manufactures cleaned up the screen\\nthe problem continues\\n\\n## 27 Answers\\n\\nFilter by: \\n\\nMost Helpful\\nNewest\\nOldest\\n\\n### Accepted Answer\\nHi,\\nWhere did you buy it? If you bought it from Apple or from an official retailer like Carphone warehouse etc. Then you\\'ll have a year warranty and can get it replaced free.\\nIf you bought it second hand, from a third part repair shop or online, then it may still have warranty, unless it is refurbished and has been repaired elsewhere.\\nIf this is the case, it may be the screen that needs replacing to solve your issue.\\nEither way, wherever you got it, it\\'s best to return it and get a refund or a replacement device. :-)\\n\\n\\n\\n### Most Helpful Answer\\nI had the same issues, screen freezing, opening apps by itself, selecting the screens and typing on it\\'s own. I first suspected aliens and then ghosts and then hackers.\\niPhone 6 is weak physically and tend to bend on pressure. And my phone had no case or cover.\\nI took the phone to apple stores and they said sensors need to be replaced and possibly screen replacement as well. My phone is just 17 months old.\\nHere is what I did two days ago and since then it is working like a charm..\\nHold the phone in portrait (as if watching a movie). Twist it very very gently. do it few times.Rest the phone for 10 mins (put it on a flat surface). You can now notice those self typing things gone and screen getting stabilized.\\nThen, reset the hardware (hold the power and home button till the screen goes off and comes back with apple logo). release the buttons when you see this.\\nThen, connect to your laptop and log in to iTunes and reset your phone completely. (please take a back-up first).\\nAnd your phone should be good to use again.\\nWhat really happened here for me is that the sensors might have stuck to the screen and with mild twisting, they got disengaged/released.\\nI posted this in Apple Community and the moderators deleted it, for the best reasons known to them.\\nInstead of throwing away your phone (or selling cheaply), try this and you could be saving your phone.\\nLet me know how it goes.\\n\\n\\n\\n### Other Answer\\nIt was the charging cord! I bought a gas station braided cord and it was the culprit. Once I plugged my OEM cord into the phone the GHOSTS went away.\\n\\n\\n\\n### Other Answer\\nI\\'ve same issue that I just get resolved. I first tried to restore it from iCloud back, however it was not a software issue or any virus issue, so after restore same problem continues. Then I get my phone to local area iphone repairing lab, and they detected that it is an LCD issue. LCD get out of order without any reason (It was neither hit or nor slipped, but LCD get out of order all and sudden, while using it) it started opening things at random. I get LCD replaced with new one, that cost me $80.00 in total ($70.00 LCD charges + $10.00 as labor charges to fix it). iPhone is back to perfect mode now. It was iphone 6s. Thanks.\\n\\n\\n\\n### Other Answer\\nI was having the same issue with my 6 plus, I took it to a repair shop, they opened the phone, disconnected the three ribbons the screen has, blew up and cleaned the connectors and connected the screen again and it solved the issue… it’s hardware, not software.\\n\\n\\n\\n### Other Answer\\nHey.\\nJust had this problem now. As it turns out, you just need to plug in your phone. I use a case and when I took it off I noticed that there was a lot of dust and dirt around the areas that the case didn\\'t cover. I shined a light in my ports and noticed they were filled with dust. Tomorrow I plan on using pressurized air to clean it out and the problem should be solved. If you plug in your phone and unplug it and it stops the issue, I recommend cleaning your phone thoroughly.\\n\\n\\n\\n### Other Answer\\nI simply changed the power supply and pr
|
|||
|
},
|
|||
|
"execution_count": 5,
|
|||
|
"metadata": {},
|
|||
|
"output_type": "execute_result"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"data"
|
|||
|
],
|
|||
|
"metadata": {
|
|||
|
"collapsed": false
|
|||
|
}
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "markdown",
|
|||
|
"source": [],
|
|||
|
"metadata": {
|
|||
|
"collapsed": false
|
|||
|
}
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 7,
|
|||
|
"outputs": [],
|
|||
|
"source": [
|
|||
|
"loader = IFixitLoader(\"https://www.ifixit.com/Device/Standard_iPad\")\n",
|
|||
|
"data = loader.load()"
|
|||
|
],
|
|||
|
"metadata": {
|
|||
|
"collapsed": false
|
|||
|
}
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 8,
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"data": {
|
|||
|
"text/plain": "[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)]"
|
|||
|
},
|
|||
|
"execution_count": 8,
|
|||
|
"metadata": {},
|
|||
|
"output_type": "execute_result"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"data"
|
|||
|
],
|
|||
|
"metadata": {
|
|||
|
"collapsed": false
|
|||
|
}
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "markdown",
|
|||
|
"source": [
|
|||
|
"## Searching iFixit using /suggest\n",
|
|||
|
"\n",
|
|||
|
"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."
|
|||
|
],
|
|||
|
"metadata": {
|
|||
|
"collapsed": false
|
|||
|
}
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 2,
|
|||
|
"outputs": [],
|
|||
|
"source": [
|
|||
|
"data = IFixitLoader.load_suggestions(\"Banana\")"
|
|||
|
],
|
|||
|
"metadata": {
|
|||
|
"collapsed": false
|
|||
|
}
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 3,
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"data": {
|
|||
|
"text/plain": "[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),\n 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)]"
|
|||
|
},
|
|||
|
"execution_count": 3,
|
|||
|
"metadata": {},
|
|||
|
"output_type": "execute_result"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"data"
|
|||
|
],
|
|||
|
"metadata": {
|
|||
|
"collapsed": false
|
|||
|
}
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": null,
|
|||
|
"outputs": [],
|
|||
|
"source": [],
|
|||
|
"metadata": {
|
|||
|
"collapsed": false
|
|||
|
}
|
|||
|
}
|
|||
|
],
|
|||
|
"metadata": {
|
|||
|
"kernelspec": {
|
|||
|
"display_name": "Python 3 (ipykernel)",
|
|||
|
"language": "python",
|
|||
|
"name": "python3"
|
|||
|
},
|
|||
|
"language_info": {
|
|||
|
"codemirror_mode": {
|
|||
|
"name": "ipython",
|
|||
|
"version": 3
|
|||
|
},
|
|||
|
"file_extension": ".py",
|
|||
|
"mimetype": "text/x-python",
|
|||
|
"name": "python",
|
|||
|
"nbconvert_exporter": "python",
|
|||
|
"pygments_lexer": "ipython3",
|
|||
|
"version": "3.11.2"
|
|||
|
}
|
|||
|
},
|
|||
|
"nbformat": 4,
|
|||
|
"nbformat_minor": 1
|
|||
|
}
|