formatMessages method
Format input values into a list of messages.
Implementation
@override
List<ChatMessage> formatMessages([final InputValues values = const {}]) {
final allValues = mergePartialAndUserVariables(values);
return promptMessages
.map(
(final m) => m.formatMessages({
for (final inputVariable in m.inputVariables)
inputVariable: ArgumentError.checkNotNull(
allValues[inputVariable],
inputVariable,
),
}),
)
.expand((final i) => i)
.toList(growable: false);
}