langchain_community.chat_loaders.utils
.merge_chat_runs¶
- langchain_community.chat_loaders.utils.merge_chat_runs(chat_sessions: Iterable[ChatSession]) Iterator[ChatSession] [source]¶
Merge chat runs together.
A chat run is a sequence of messages from the same sender.
- Parameters
chat_sessions (Iterable[ChatSession]) – A list of chat sessions.
- Returns
A list of chat sessions with merged chat runs.
- Return type
Iterator[ChatSession]