Toggle Menu
Prev Up Next

# `langchain_core.messages.utils`.messages_from_dict

langchain_core.messages.utils.messages_from_dict(messages: Sequence[dict]) → List[BaseMessage]

  Convert a sequence of messages from dicts to Message objects.

  Parameters

    messages (Sequence[dict]) – Sequence of messages (as dicts) to convert.

  Returns

    List of messages (BaseMessages).

  Return type

    List[BaseMessage]