The serialized records carried in INotebookChatHistory store their
message in LangChain's message_to_dict form ({type, data: {...}}). The
UI, however, expects a flat message with a derived text field, so
ChatHistory adapts each record into this shape.
The flattened message shape consumed by the UI.
The serialized records carried in INotebookChatHistory store their message in LangChain's
message_to_dictform ({type, data: {...}}). The UI, however, expects a flat message with a derivedtextfield, so ChatHistory adapts each record into this shape.