copyWith method
A copy with the given properties replaced; everything else, unknown keys included, is kept.
Implementation
PromptMessage copyWith({
ContentBlock? content,
Role? role,
}) =>
PromptMessage.fromJson({
...toJson(),
if (content != null) 'content': $encode(content),
if (role != null) 'role': $encode(role),
});