classmethod from_role_strings(string_messages: List[Tuple[str, str]]) → ChatPromptTemplate¶
[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¶
[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¶
Create a chat prompt template from a template string.
Creates a chat template consisting of a single message assumed to be from
the human.
Parameters
template – template string
**kwargs – keyword arguments to pass to the constructor.
Returns
A new instance of this class.
classmethod get_lc_namespace() → List[str]¶
Get the namespace of the langchain object.
For example, if the class is langchain.llms.openai.OpenAI, then the
namespace is [“langchain”, “llms”, “openai”]