[docs]classImageMessagePart(BaseModel):type:Literal["image"]data:str# Use 'data' here to store your data URL string
# we need to be able to serialize this data to JSON# so we can send# it over the network# implementaion for ImageMessagePart json serialization:# https://pydantic-docs.helpmanual.io/usage/exporting_models/#json-serialisation# https://pydantic-docs.helpmanual.io/usage/exporting_models/#json-serialisation# Use Union to create a discriminated union typeMessageParts=Union[TextMessagePart,ImageMessagePart]