map_ai_messages#

langchain_community.chat_loaders.utils.map_ai_messages(chat_sessions: Iterable[ChatSession], sender: str) β†’ Iterator[ChatSession][source]#

Convert messages from the specified β€˜sender’ to AI messages.

This is useful for fine-tuning the AI to adapt to your voice.

Parameters:
  • chat_sessions (Iterable[ChatSession]) –

  • sender (str) –

Return type:

Iterator[ChatSession]

Examples using map_ai_messages