AssistantMessage constructor
AssistantMessage({
- String? uuid,
- String? timestamp,
- String? messageId,
- String model = syntheticModel,
- required List<
ContentBlock> content, - Usage usage = const Usage(),
- String? stopReason = 'stop_sequence',
- String? requestId,
- bool isApiErrorMessage = false,
- bool? isVirtual,
- Map<
String, dynamic> ? apiError, - Map<
String, dynamic> ? error, - String? errorDetails,
- String? advisorModel,
Implementation
AssistantMessage({
String? uuid,
String? timestamp,
String? messageId,
this.model = syntheticModel,
required this.content,
this.usage = const Usage(),
this.stopReason = 'stop_sequence',
this.requestId,
this.isApiErrorMessage = false,
this.isVirtual,
this.apiError,
this.error,
this.errorDetails,
this.advisorModel,
}) : uuid = uuid ?? const Uuid().v4(),
timestamp = timestamp ?? DateTime.now().toUtc().toIso8601String(),
messageId = messageId ?? const Uuid().v4();