mirror of https://github.com/xtekky/gpt4free
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
791 B
Python
38 lines
791 B
Python
import sys
|
|
from typing import Any, AsyncGenerator, Generator, NewType, Tuple, Union, List, Dict, Type, IO, Optional
|
|
try:
|
|
from PIL.Image import Image
|
|
except ImportError:
|
|
Image = type
|
|
|
|
if sys.version_info >= (3, 8):
|
|
from typing import TypedDict
|
|
else:
|
|
from typing_extensions import TypedDict
|
|
|
|
SHA256 = NewType('sha_256_hash', str)
|
|
CreateResult = Generator[str, None, None]
|
|
AsyncResult = AsyncGenerator[str, None]
|
|
Messages = List[Dict[str, str]]
|
|
Cookies = List[Dict[str, str]]
|
|
ImageType = Union[str, bytes, IO, Image, None]
|
|
|
|
__all__ = [
|
|
'Any',
|
|
'AsyncGenerator',
|
|
'Generator',
|
|
'Tuple',
|
|
'Union',
|
|
'List',
|
|
'Dict',
|
|
'Type',
|
|
'IO',
|
|
'Optional',
|
|
'TypedDict',
|
|
'SHA256',
|
|
'CreateResult',
|
|
'AsyncResult',
|
|
'Messages',
|
|
'ImageType'
|
|
]
|