messages – sequence of message representations.
A message can be represented using the following formats:
(1) BaseMessagePromptTemplate, (2) BaseMessage, (3) 2-tuple of
(message type, template); e.g., (“human”, “{user_input}”),
(4) 2-tuple of (message class, template), (4) a string which is
shorthand for (“human”, template); e.g., “{user_input}”
Returns
a chat prompt template
classmethod from_orm(obj: Any) → Model¶
classmethod from_role_strings(string_messages: List[Tuple[str, str]]) → ChatPromptTemplate[source]¶
[Deprecated]  Create a chat prompt template from a list of (role, template) tuples.
Parameters
string_messages – list of (role, template) tuples.
string_messages – list of (role, template) tuples.
Returns
a chat prompt template[Deprecated] Create a chat prompt template from a list of (role, template) tuples.
Returns
a chat prompt template
Notes
Deprecated since version 0.0.260: Use from_messages classmethod instead.
classmethod from_strings(string_messages: List[Tuple[Type[BaseMessagePromptTemplate], str]]) → ChatPromptTemplate[source]¶
[Deprecated]  Create a chat prompt template from a list of (role class, template) tuples.
Parameters
string_messages – list of (role class, template) tuples.
string_messages – list of (role class, template) tuples.
Returns
a chat prompt template[Deprecated] Create a chat prompt template from a list of (role class, template) tuples.
Returns
a chat prompt template
Notes
Deprecated since version 0.0.260: Use from_messages classmethod instead.
classmethod from_template(template: str, **kwargs: Any) → ChatPromptTemplate[source]¶