gpt4free/g4f/typing.py

32 lines
678 B
Python
Raw Normal View History

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