Toggle Menu
Prev Up Next

# `langchain_community.adapters.openai`.convert_message_to_dict

langchain_community.adapters.openai.convert_message_to_dict(message: BaseMessage) → dict

  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

- Filter out tweets that reference other tweets, because it’s a bit weird