summaryrefslogblamecommitdiffstats
path: root/g4f/typing.py
blob: cfddf4a82a0cb60f455fd2e775ea9c22132cb7b8 (plain) (tree)
1
2
3
4
5
6
7
8
9
          
                                                                                    




                                           
 
                                     
                                         
                                       
                               
 
           




                     

                   
 
import sys
from typing import Any, AsyncGenerator, Generator, NewType, Tuple, Union, List, Dict

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]]

__all__ = [
    'Any',
    'AsyncGenerator',
    'Generator',
    'Tuple',
    'TypedDict',
    'SHA256',
    'CreateResult',
]