def convert_history(history): chat_history = [] for block in history: chat_history.append(["user", block[0]]) chat_history.append(["llm", block[1]]) return chat_history