def _stringify_chat_message(msg: ChatMessage) -> Dict:
    """Utility function to convert chatmessage to serializable dict."""
    msg_dict = msg.model_dump()
    msg_dict["additional_kwargs"] = _stringify_obj(msg_dict["additional_kwargs"])
    msg_dict["content"] = msg.content
    return msg_dict
Utility function to convert chatmessage to serializable dict.
llama-index-core/llama_index/core/memory/vector_memory.py