Async version of enumerate function.
Convert a dictionary to a LangChain message.
Convert a LangChain message to a dictionary.
Convert dictionaries representing OpenAI messages to LangChain format.
Convert messages to a list of lists of dictionaries for fine-tuning.