ChatMessage constructor
ChatMessage({
- required ChatMessageRole role,
- List<
StandardPart> parts = const [], - Map<
String, Object?> metadata = const {}, - FinishStatus? finishStatus,
Creates a new message.
If parts or metadata are not provided, empty collections are used.
If there are no parts of type TextPart, the text property will be empty.
If there is more than one part of type TextPart, the text property will be a concatenation of all of them.
Implementation
ChatMessage({
required this.role,
this.parts = const [],
this.metadata = const {},
this.finishStatus,
});