Toggle Menu
Prev Up Next

# `langchain_community.chat_loaders.facebook_messenger`.FolderFacebookMessengerChatLoader

class langchain_community.chat_loaders.facebook_messenger.FolderFacebookMessengerChatLoader(path: Union[str, Path])

  Load Facebook Messenger chat data from a folder.

  Parameters

    path (Union[str, Path]) – The path to the directory containing the chat files.

  path

    The path to the directory containing the chat files.

    Type

      Path

  Methods

  `__init__`(path) |
  `lazy_load`() | Lazy loads the chat data from the folder.
  `load`() | Eagerly load the chat sessions into memory.

  __init__(path: Union[str, Path]) → None
    Parameters

      path (Union[str, Path]) –

    Return type

      None

  lazy_load() → Iterator[ChatSession]

    Lazy loads the chat data from the folder.

    Yields

      ChatSession – A chat session containing the loaded messages.

    Return type

      Iterator[ChatSession]

  load() → List[ChatSession]

    Eagerly load the chat sessions into memory.

    Return type

      List[ChatSession]

# Examples using FolderFacebookMessengerChatLoader

- Facebook - Meta

- This uses some example data