langchain.adapters.openai.convert_messages_for_finetuning

langchain.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 – The chat sessions.

Returns

The list of lists of dictionaries.

Examples using convert_messages_for_finetuning