langchain/memory/chat_message_histories/file.py/FileChatMessageHistory/add_message
class FileChatMessageHistory:    def add_message(self, message: BaseMessage) -> None:
        """Append the message to the record in the local file"""
        messages = messages_to_dict(self.messages)
        messages.append(messages_to_dict([message])[0])
        self.file_path.write_text(json.dumps(messages))