MapsAttachments
trait MapsAttachments
Methods
array
mapAttachments(Collection $attachments)
Map the given Hypervel attachments to Anthropic content blocks.
array
documentSource(string|null $mimeType, callable $rawResolver, callable $base64Resolver)
Build the Anthropic document source block for the given mime type.
array
remoteDocumentSource(RemoteDocument $document)
Build the Anthropic document source block for the given remote document.
string|null
normalizeMimeType(string|null $mimeType)
Strip any parameters from the given mime type.
bool
Details
at line 29
protected array
mapAttachments(Collection $attachments)
Map the given Hypervel attachments to Anthropic content blocks.
at line 142
protected array
documentSource(string|null $mimeType, callable $rawResolver, callable $base64Resolver)
Build the Anthropic document source block for the given mime type.
at line 178
protected array
remoteDocumentSource(RemoteDocument $document)
Build the Anthropic document source block for the given remote document.
at line 204
protected string|null
normalizeMimeType(string|null $mimeType)
Strip any parameters from the given mime type.
at line 212
protected bool
isImage(UploadedFile $attachment)
Determine if the given uploaded file is an image.