assistant.bones.image¶
Classes¶
RelSkel designed to use as using skeleton in a |
|
A specialized |
Module Contents¶
- class assistant.bones.image.ImageBoneRelSkel¶
Bases:
viur.core.skeleton.RelSkelRelSkel designed to use as using skeleton in a
ImageBone.- alt¶
- class assistant.bones.image.ImageBone(*, using=ImageBoneRelSkel, validMimeTypes=('image/*',), enable_describe_image=True, **kwargs)¶
Bases:
viur.core.bones.FileBoneA specialized
FileBonefor image files.This bone type extends
FileBoneby:Restricting accepted MIME types to images (by default).
Has a using skel with an alt
StringBone.Optionally enabling the Describe Image bone action, which allows AI to generate an alt-text or caption for the uploaded image via an admin-triggerable action.
Initialize an ImageBone, a file-based bone specialized for handling image uploads.
Optionally adds a bone action that allows AI-based image description (alt-text generation) to be triggered from within the admin interface.
- Parameters:
using (Type[viur.core.skeleton.RelSkel]) – The relational skeleton class used for additional data of this image. Defaults to
ImageBoneRelSkel, including the altStringBone.validMimeTypes (None | Iterable[str]) – A list of accepted MIME types. Defaults to only allow image types (
("image/*",)).enable_describe_image (bool) – If
True, the bone will include theDESCRIBE_IMAGEbone action, allowing AI-assisted image description via the vi-admin UI.kwargs – Additional keyword arguments passed to the base
FileBone.
- type¶