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 Chat Completions content parts.

bool
isImage(UploadedFile $attachment)

Determine if the given uploaded file is an image.

bool
isAudio(UploadedFile $attachment)

Determine if the given uploaded file is an audio file.

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 34
protected array mapAttachments(Collection $attachments)

Map the given Hypervel attachments to Chat Completions content parts.

Parameters

Collection $attachments

Return Value

array

at line 136
protected bool isImage(UploadedFile $attachment)

Determine if the given uploaded file is an image.

Parameters

UploadedFile $attachment

Return Value

bool

at line 153
protected bool isAudio(UploadedFile $attachment)

Determine if the given uploaded file is an audio file.

Parameters

UploadedFile $attachment

Return Value

bool