trait MapsAttachments

Methods

array
mapAttachments(Collection $attachments)

Map the given Hypervel attachments to Gemini content blocks.

array
mapAttachment(mixed $attachment)

Map a Hypervel attachment to a Gemini content block.

string
contentTypeFor(string|null $mime)

Resolve the Gemini content block type for the given MIME type.

bool
isYouTubeUrl(string $url)

Determine if the given URL is a YouTube URL, which Gemini accepts as a file URI.

Details

at line 36
protected array mapAttachments(Collection $attachments)

Map the given Hypervel attachments to Gemini content blocks.

Parameters

Collection $attachments

Return Value

array

at line 44
protected array mapAttachment(mixed $attachment)

Map a Hypervel attachment to a Gemini content block.

Parameters

mixed $attachment

Return Value

array

at line 165
protected string contentTypeFor(string|null $mime)

Resolve the Gemini content block type for the given MIME type.

Parameters

string|null $mime

Return Value

string

at line 178
protected bool isYouTubeUrl(string $url)

Determine if the given URL is a YouTube URL, which Gemini accepts as a file URI.

Parameters

string $url

Return Value

bool