langchain_community.chat_models.tongyi.convert_dict_to_message

langchain_community.chat_models.tongyi.convert_dict_to_message(_dict: Mapping[str, Any], is_chunk: bool = False) Union[BaseMessage, BaseMessageChunk][source]

Convert a dict to a message.

Parameters
  • _dict (Mapping[str, Any]) –

  • is_chunk (bool) –

Return type

Union[BaseMessage, BaseMessageChunk]