message_to_dict#
- langchain_core.messages.base.message_to_dict(
- message: BaseMessage,
Convert a Message to a dictionary.
- Parameters:
message (BaseMessage) – Message to convert.
- Returns:
Message as a dict. The dict will have a
type
key with the message type and adata
key with the message data as a dict.- Return type:
dict