convert_message_to_dict#

langchain_community.adapters.openai.convert_message_to_dict(message: BaseMessage) dict[source]#

Convert a LangChain message to a dictionary.

Parameters:

message (BaseMessage) – The LangChain message.

Returns:

The dictionary.

Return type:

dict

Examples using convert_message_to_dict