Toggle Menu
Prev Up Next

# `langchain_community.adapters.openai`.convert_messages_for_finetuning

langchain_community.adapters.openai.convert_messages_for_finetuning(sessions: Iterable[ChatSession]) → List[List[dict]]

  Convert messages to a list of lists of dictionaries for fine-tuning.

  Parameters

    sessions (Iterable[ChatSession]) – The chat sessions.

  Returns

    The list of lists of dictionaries.

  Return type

    List[List[dict]]

# Examples using convert_messages_for_finetuning

- This uses some example data

- Wait for the fine-tuning to complete (this may take some time)