OpenAIImageToolkit
init
- timeout (Optional[float]): The timeout value for API requests in seconds. If None, no timeout is applied. (default: :obj:
None
)
base64_to_image
- base64_string (str): The base64 encoded string of the image.
image_path_to_base64
- image_path (str): The path to the image file.
image_to_base64
- image: The image object to be encoded, supports any image format that can be saved in PNG format.
get_dalle_img
- prompt (str): The text prompt based on which the image is generated.
- image_dir (str): The directory to save the generated image. Defaults to ‘img’.