copyWith method

  1. @override
StringMessagePromptTemplate copyWith({
  1. BasePromptTemplate? prompt,
})
override

Return a new StringMessagePromptTemplate instance with the given values.

Implementation

@override
StringMessagePromptTemplate copyWith({
  final BasePromptTemplate? prompt,
}) {
  return CustomChatMessagePromptTemplate(
    prompt: prompt as PromptTemplate? ?? this.prompt,
    role: role,
  );
}