merge_chat_runs_in_session#

langchain_community.chat_loaders.utils.merge_chat_runs_in_session(chat_session: ChatSession, delimiter: str = '\n\n') ChatSession[source]#

Merge chat runs together in a chat session.

A chat run is a sequence of messages from the same sender.

Parameters:
  • chat_session (ChatSession) – A chat session.

  • delimiter (str)

Returns:

A chat session with merged chat runs.

Return type:

ChatSession