AssistantMessage constructor

AssistantMessage({
  1. String? uuid,
  2. String? timestamp,
  3. String? messageId,
  4. String model = syntheticModel,
  5. required List<ContentBlock> content,
  6. Usage usage = const Usage(),
  7. String? stopReason = 'stop_sequence',
  8. String? requestId,
  9. bool isApiErrorMessage = false,
  10. bool? isVirtual,
  11. Map<String, dynamic>? apiError,
  12. Map<String, dynamic>? error,
  13. String? errorDetails,
  14. 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();