trait MapsAttachments

Traits

Methods

string
fallbackFilename(string|null $mimeType)

Derive a filename for a nameless document from its MIME type.

array
mapAttachments(Collection $attachments)

Map the given Hypervel attachments to xAI content parts.

bool
isImage(UploadedFile $attachment)

Determine if the given uploaded file is an image.

Details

protected string fallbackFilename(string|null $mimeType)

Derive a filename for a nameless document from its MIME type.

Parameters

string|null $mimeType

Return Value

string

at line 30
protected array mapAttachments(Collection $attachments)

Map the given Hypervel attachments to xAI content parts.

Parameters

Collection $attachments

Return Value

array

at line 102
protected bool isImage(UploadedFile $attachment)

Determine if the given uploaded file is an image.

Parameters

UploadedFile $attachment

Return Value

bool