AIAttachment.imageBytes constructor

AIAttachment.imageBytes(
  1. List<int> bytes, {
  2. String? mimeType,
})

Creates an image attachment from bytes.

Implementation

factory AIAttachment.imageBytes(List<int> bytes, {String? mimeType}) {
  return AIAttachment(
    type: AIAttachmentType.image,
    bytes: bytes,
    mimeType: mimeType ?? 'image/png',
  );
}