Bytes Bytes Bases: Field Source code in griptape/griptape/utils/marshmallow/fields/bytes.py 5 6 7 8 9 10 11 12 13 14class Bytes(fields.Field): def _serialize(self, value, attr, obj, **kwargs): return base64.b64encode(value).decode() def _deserialize(self, value, attr, data, **kwargs): return base64.b64decode(value) def _validate(self, value): if not isinstance(value, bytes): raise ValidationError("Invalid input type.")