langchain_community.document_loaders.onenote
.OneNoteLoader¶
- class langchain_community.document_loaders.onenote.OneNoteLoader[source]¶
Bases:
BaseLoader
,BaseModel
Load pages from OneNote notebooks.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- param access_token: str = ''¶
Personal access token
- param auth_with_token: bool = False¶
Whether to authenticate with a token or not. Defaults to False.
- param authority_url: str = 'https://login.microsoftonline.com/consumers/'¶
A URL that identifies a token authority
- param notebook_name: Optional[str] = None¶
Filter on notebook name
- param object_ids: Optional[List[str]] = None¶
The IDs of the objects to load data from.
- param onenote_api_base_url: str = 'https://graph.microsoft.com/v1.0/me/onenote'¶
URL of Microsoft Graph API for OneNote
- param page_title: Optional[str] = None¶
Filter on section name
- param section_name: Optional[str] = None¶
Filter on section name
- param settings: _OneNoteGraphSettings [Optional]¶
Settings for the Microsoft Graph API client.
- param token_path: FilePath = PosixPath('/home/runner/.credentials/onenote_graph_token.txt')¶
Path to the file where the access token is stored
- Constraints
format = file-path
- async alazy_load() AsyncIterator[Document] ¶
A lazy loader for Documents.
- Return type
AsyncIterator[Document]
- lazy_load() Iterator[Document] [source]¶
Get pages from OneNote notebooks.
- Returns
page_content
- metadata
title
- Return type
A list of Documents with attributes
- load_and_split(text_splitter: Optional[TextSplitter] = 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]