ChatMessagePromptTemplate.human constructor
ChatMessagePromptTemplate.human(
- String template, {
- PartialValues? partialVariables,
- bool validateTemplate = true,
Creates a HumanChatMessagePromptTemplate from a string template.
This is a convenience factory equivalent to HumanChatMessagePromptTemplate.fromTemplate.
Example:
final msgTemplate = ChatMessagePromptTemplate.human(
"Hello {foo}, I'm {bar}. Thanks for the {context}",
);
template
the template string.partialVariables
the partial variables to use for the template.validateTemplate
whether to validate the template.
Implementation
factory ChatMessagePromptTemplate.human(
final String template, {
final PartialValues? partialVariables,
final bool validateTemplate = true,
}) {
return HumanChatMessagePromptTemplate.fromTemplate(
template,
partialVariables: partialVariables,
validateTemplate: validateTemplate,
);
}