QuipLoader#

class langchain_community.document_loaders.quip.QuipLoader(api_url: str, access_token: str, request_timeout: int | None = 60, *, allow_dangerous_xml_parsing: bool = False)[source]#

Load Quip pages.

Port of quip/quip-api

Parameters:

Methods

__init__(api_url, access_token[, ...])

alazy_load()

A lazy loader for Documents.

aload()

Load data into Document objects.

get_thread_ids_by_folder_id(folder_id, ...)

Get thread ids by folder id and update in thread_ids

lazy_load()

A lazy loader for Documents.

load([folder_ids, thread_ids, max_docs, ...])

:param : param folder_ids: List of specific folder IDs to load, defaults to None :param : param thread_ids: List of specific thread IDs to load, defaults to None :param : param max_docs: Maximum number of docs to retrieve in total, defaults 1000 :param : param include_all_folders: Include all folders that your access_token can access, but doesn't include your private folder :param : param include_comments: Include comments, defaults to False :param : param include_images: Include images, defaults to False

load_and_split([text_splitter])

Load Documents and split into chunks.

process_thread(thread_id, include_images, ...)

process_thread_images(tree)

process_thread_messages(thread_id)

process_threads(thread_ids, include_images, ...)

Process a list of thread into a list of documents.

__init__(api_url: str, access_token: str, request_timeout: int | None = 60, *, allow_dangerous_xml_parsing: bool = False)[source]#
Parameters:
async alazy_load() AsyncIterator[Document]#

A lazy loader for Documents.

Return type:

AsyncIterator[Document]

async aload() list[Document]#

Load data into Document objects.

Return type:

list[Document]

get_thread_ids_by_folder_id(folder_id: str, depth: int, thread_ids: List[str]) None[source]#

Get thread ids by folder id and update in thread_ids

Parameters:
  • folder_id (str)

  • depth (int)

  • thread_ids (List[str])

Return type:

None

lazy_load() Iterator[Document]#

A lazy loader for Documents.

Return type:

Iterator[Document]

load(folder_ids: List[str] | None = None, thread_ids: List[str] | None = None, max_docs: int | None = 1000, include_all_folders: bool = False, include_comments: bool = False, include_images: bool = False) List[Document][source]#

:param : param folder_ids: List of specific folder IDs to load, defaults to None :param : param thread_ids: List of specific thread IDs to load, defaults to None :param : param max_docs: Maximum number of docs to retrieve in total, defaults 1000 :param : param include_all_folders: Include all folders that your access_token

can access, but doesn’t include your private folder

:param : param include_comments: Include comments, defaults to False :param : param include_images: Include images, defaults to False

Parameters:
  • folder_ids (List[str] | None)

  • thread_ids (List[str] | None)

  • max_docs (int | None)

  • include_all_folders (bool)

  • include_comments (bool)

  • include_images (bool)

Return type:

List[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]

process_thread(thread_id: str, include_images: bool, include_messages: bool) Document | None[source]#
Parameters:
  • thread_id (str)

  • include_images (bool)

  • include_messages (bool)

Return type:

Document | None

process_thread_images(tree: ElementTree) str[source]#
Parameters:

tree (ElementTree)

Return type:

str

process_thread_messages(thread_id: str) str[source]#
Parameters:

thread_id (str)

Return type:

str

process_threads(thread_ids: Sequence[str], include_images: bool, include_messages: bool) List[Document][source]#

Process a list of thread into a list of documents.

Parameters:
  • thread_ids (Sequence[str])

  • include_images (bool)

  • include_messages (bool)

Return type:

List[Document]

Examples using QuipLoader