copyWith method

AgentMessage copyWith({
  1. AgentMessageRole? role,
  2. String? text,
  3. int? turn,
})

Implementation

AgentMessage copyWith({AgentMessageRole? role, String? text, int? turn}) {
  return AgentMessage.fromTrusted(
    role: role ?? this.role,
    text: text ?? this.text,
    turn: turn ?? this.turn,
  );
}