formatMessages method

  1. @override
List<ChatMessage> formatMessages([
  1. Map<String, dynamic> values = const {}
])
override

Format the prompt with the inputs returning a list of messages.

  • values - Any arguments to be passed to the prompt template.

Implementation

@override
List<ChatMessage> formatMessages([
  final Map<String, dynamic> values = const {},
]) {
  final message = values[variableName] as ChatMessage?;
  return [if (message != null) message];
}