YuqueLoader#
- class langchain_community.document_loaders.yuque.YuqueLoader(access_token: str, api_url: str = 'https://www.yuque.com')[source]#
Load documents from Yuque.
Initialize with Yuque access_token and api_url.
- Parameters:
access_token (str) β Personal access token - see https://www.yuque.com/settings/tokens.
api_url (str) β Yuque API url.
Attributes
headers
Methods
__init__
(access_token[,Β api_url])Initialize with Yuque access_token and api_url.
A lazy loader for Documents.
aload
()Load data into Document objects.
get_books
(user_id)get_document
(book_id,Β document_id)get_document_ids
(book_id)http_get
(url)A lazy loader for Documents.
load
()Load documents from Yuque.
load_and_split
([text_splitter])Load Documents and split into chunks.
parse_document
(document)parse_document_body
(body)- __init__(access_token: str, api_url: str = 'https://www.yuque.com')[source]#
Initialize with Yuque access_token and api_url.
- Parameters:
access_token (str) β Personal access token - see https://www.yuque.com/settings/tokens.
api_url (str) β Yuque API url.
- async alazy_load() AsyncIterator[Document] #
A lazy loader for Documents.
- Return type:
AsyncIterator[Document]
- get_document(book_id: int, document_id: int) Dict [source]#
- Parameters:
book_id (int)
document_id (int)
- Return type:
Dict
- 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]
Examples using YuqueLoader