langchain_community.adapters.openai.convert_messages_for_finetuning¶

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

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¶