in bot/gemini_model.py [0:0]
def from_bytes(cls, data: bytes, mime_type: str) -> "ChatPart":
"""
Create a model ChatPart object to represent attached image.
Stores the bytes content and assigns the `role` as "model".
Saves the token count by querying Gemini model.
"""
part = Part.from_bytes(bytes=data, mime_type=mime_type)
return cls(part, "model", cls._count_tokens(part))