2023-09-11 07:29:48 +00:00
|
|
|
import sys
|
2024-01-13 14:37:36 +00:00
|
|
|
from typing import Any, AsyncGenerator, Generator, NewType, Tuple, Union, List, Dict, Type, IO
|
|
|
|
from PIL.Image import Image
|
2023-09-11 07:29:48 +00:00
|
|
|
|
|
|
|
if sys.version_info >= (3, 8):
|
|
|
|
from typing import TypedDict
|
|
|
|
else:
|
|
|
|
from typing_extensions import TypedDict
|
2023-06-24 01:47:00 +00:00
|
|
|
|
2023-08-27 15:37:44 +00:00
|
|
|
SHA256 = NewType('sha_256_hash', str)
|
2023-07-28 10:07:17 +00:00
|
|
|
CreateResult = Generator[str, None, None]
|
2023-10-08 12:31:46 +00:00
|
|
|
AsyncResult = AsyncGenerator[str, None]
|
2023-10-08 11:59:56 +00:00
|
|
|
Messages = List[Dict[str, str]]
|
2024-01-13 14:37:36 +00:00
|
|
|
ImageType = Union[str, bytes, IO, Image, None]
|
2023-07-28 10:07:17 +00:00
|
|
|
|
|
|
|
__all__ = [
|
2023-08-27 15:37:44 +00:00
|
|
|
'Any',
|
|
|
|
'AsyncGenerator',
|
|
|
|
'Generator',
|
|
|
|
'Tuple',
|
2024-01-21 01:20:23 +00:00
|
|
|
'Union',
|
|
|
|
'List',
|
|
|
|
'Dict',
|
|
|
|
'Type',
|
2023-08-27 15:37:44 +00:00
|
|
|
'TypedDict',
|
2023-09-17 21:23:54 +00:00
|
|
|
'SHA256',
|
|
|
|
'CreateResult',
|
2024-01-21 01:20:23 +00:00
|
|
|
'AsyncResult',
|
|
|
|
'Messages',
|
|
|
|
'ImageType'
|
2023-09-11 07:29:48 +00:00
|
|
|
]
|