In real world applications Attribute-based Encryption (ABE) is used in conjunction with a symmetric cipher, because you can only encrypt group elements with ABE. In this case it is the multiplicative group $G_T$.
The number of bits is limited when you try to represent text messages (bit strings) with a group element, because the size of the group is derived from a prime. In Charm it is most likely 512 bit prime. You cannot represent messages that are bigger than any group element, if you would have a mapping function to map bit strings to group elements and back again.
Generally something else is done. It is called hybrid encryption in the context of ABE. The text message is encrypted using AES or other symmetric ciphers and the random key that was used is derived from the random $G_T$ element.
- Generate a random $G_T$ element with
el = group.random(GT).
- Generate bytes from
el e.g. like this
extractor(el) or even
hashlib.sha256(str(el)).digest() which can be directly used as the AES key.
- You would encrypt your text message with a symmetric cipher like AES-256 using the previously generated key.
Charm provides something for steps 2 and 3:
The schemes that are implemented in Charm don't go this far to implement hybrid version of the scheme, because it would be the same for every one of them. It is unnecessary for the validation of the functionality of the scheme. This is why the message is just a random group element as a placeholder for a real world message.