promptflow.contracts.multimedia module#
- class promptflow.contracts.multimedia.Image(value: bytes, *args, **kwargs)#
Bases:
PFBytes
This class is used to represent an image in PromptFlow. It is a subclass of ~promptflow.contracts.multimedia.PFBytes.
- serialize(encoder: Optional[Callable] = None)#
Serialize the image to a dictionary.
- class promptflow.contracts.multimedia.PFBytes(value: bytes, *args, **kwargs)#
Bases:
bytes
This class is used to represent a bytes object in PromptFlow. It has all the functionalities of a bytes object, and also has some additional methods to help with serialization and deserialization.
- property source_url#
- to_base64(with_type: bool = False)#
Returns the base64 representation of the PFBytes.