SingleFileFacebookMessengerChatLoader#

class langchain_community.chat_loaders.facebook_messenger.SingleFileFacebookMessengerChatLoader(path: Path | str)[source]#

Load Facebook Messenger chat data from a single file.

Parameters:

path (Union[Path, str]) – The path to the chat file.

Methods

__init__(path)

lazy_load()

Lazy loads the chat data from the file.

load()

Eagerly load the chat sessions into memory.

__init__(path: Path | str) None[source]#
Parameters:

path (Path | str)

Return type:

None

lazy_load() Iterator[ChatSession][source]#

Lazy loads the chat data from the file.

Yields:

ChatSession – A chat session containing the loaded messages.

Return type:

Iterator[ChatSession]

load() list[ChatSession]#

Eagerly load the chat sessions into memory.

Returns:

A list of chat sessions.

Return type:

list[ChatSession]

Examples using SingleFileFacebookMessengerChatLoader