utils module

utils.encode_image_to_base64(img: np.ndarray) str[source]

Encode an image to a base64 string, to be included as an image_url in a Message.

utils.is_coroutine_callable(obj) bool[source]

Get if the input object is awaitable.

utils.partial_format(value: str, **formats: dict[str, Any]) str[source]

Partially format a string given a variable amount of formats.