trait MapsAttachments

Traits

Methods

string
fallbackFilename(string|null $mimeType)

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

array
mapAttachments(Collection $attachments, Provider $provider)

Map the given Hypervel attachments to OpenAI 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 34
protected array mapAttachments(Collection $attachments, Provider $provider)

Map the given Hypervel attachments to OpenAI content parts.

Parameters

Collection $attachments
Provider $provider

Return Value

array

at line 115
protected bool isImage(UploadedFile $attachment)

Determine if the given uploaded file is an image.

Parameters

UploadedFile $attachment

Return Value

bool