IFixitLoader#
- class langchain_community.document_loaders.ifixit.IFixitLoader(web_path: str)[source]#
Load iFixit repair guides, device wikis and answers.
iFixit 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.
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 and web scraping.
Initialize with a web path.
Methods
__init__
(web_path)Initialize with a web path.
A lazy loader for Documents.
aload
()Load data into Document objects.
A lazy loader for Documents.
load
()Load data into Document objects.
load_and_split
([text_splitter])Load Documents and split into chunks.
load_device
([url_override, include_guides])Loads a device
load_guide
([url_override])Load a guide
load_questions_and_answers
([url_override])Load a list of questions and answers.
load_suggestions
([query, doc_type])Load suggestions.
- Parameters:
web_path (str)
- async alazy_load() AsyncIterator[Document] #
A lazy loader for Documents.
- Return type:
AsyncIterator[Document]
- load_and_split(text_splitter: TextSplitter | None = None) list[Document] #
Load Documents and split into chunks. Chunks are returned as Documents.
Do not override this method. It should be considered to be deprecated!
- Parameters:
text_splitter (Optional[TextSplitter]) – TextSplitter instance to use for splitting documents. Defaults to RecursiveCharacterTextSplitter.
- Returns:
List of Documents.
- Return type:
list[Document]
- load_device(url_override: str | None = None, include_guides: bool = True) List[Document] [source]#
Loads a device
- Parameters:
url_override (str | None) – A URL to override the default URL.
include_guides (bool) – Whether to include guides linked to from the device. Defaults to True.
- Return type:
List[Document]
Returns:
- load_guide(url_override: str | None = None) List[Document] [source]#
Load a guide
- Parameters:
url_override (str | None) – A URL to override the default URL.
- Return type:
List[Document]
Returns: List[Document]
- load_questions_and_answers(url_override: str | None = None) List[Document] [source]#
Load a list of questions and answers.
- Parameters:
url_override (str | None) – A URL to override the default URL.
- Return type:
List[Document]
Returns: List[Document]
- static load_suggestions(query: str = '', doc_type: str = 'all') List[Document] [source]#
Load suggestions.
- Parameters:
query (str) – A query string
doc_type (str) – The type of document to search for. Can be one of “all”, “device”, “guide”, “teardown”, “answer”, “wiki”.
- Return type:
List[Document]
Returns:
Examples using IFixitLoader