fromTemplateFile static method
      
Future<CustomChatMessagePromptTemplate> 
fromTemplateFile(
    
- String templateFile, {
- required String role,
- PartialValues? partialVariables,
- bool validateTemplate = true,
Load a prompt from a file. It considers the prompt a CustomChatMessage.
- templateFilethe path to the file containing the prompt template.
- partialVariablesthe partial variables to use for the template.
- validateTemplatewhether to validate the template.
Implementation
static Future<CustomChatMessagePromptTemplate> fromTemplateFile(
  final String templateFile, {
  required final String role,
  final PartialValues? partialVariables,
  final bool validateTemplate = true,
}) async {
  final file = XFile(templateFile);
  final template = await file.readAsString();
  return CustomChatMessagePromptTemplate.fromTemplate(
    template,
    role: role,
    partialVariables: partialVariables,
    validateTemplate: validateTemplate,
  );
}