diff options
author | hs_junxiang <jimmy871117@gmail.com> | 2023-09-11 09:29:48 +0200 |
---|---|---|
committer | hs_junxiang <jimmy871117@gmail.com> | 2023-09-11 09:29:48 +0200 |
commit | 8ad46284b9b12af43d542f4751975c4d5911e1ef (patch) | |
tree | 7907c93113e2c0bdf8811620690446ab94d503c9 /g4f/typing.py | |
parent | ~ (diff) | |
download | gpt4free-8ad46284b9b12af43d542f4751975c4d5911e1ef.tar gpt4free-8ad46284b9b12af43d542f4751975c4d5911e1ef.tar.gz gpt4free-8ad46284b9b12af43d542f4751975c4d5911e1ef.tar.bz2 gpt4free-8ad46284b9b12af43d542f4751975c4d5911e1ef.tar.lz gpt4free-8ad46284b9b12af43d542f4751975c4d5911e1ef.tar.xz gpt4free-8ad46284b9b12af43d542f4751975c4d5911e1ef.tar.zst gpt4free-8ad46284b9b12af43d542f4751975c4d5911e1ef.zip |
Diffstat (limited to 'g4f/typing.py')
-rw-r--r-- | g4f/typing.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/g4f/typing.py b/g4f/typing.py index 02386037..5f63c222 100644 --- a/g4f/typing.py +++ b/g4f/typing.py @@ -1,4 +1,10 @@ -from typing import Any, AsyncGenerator, Generator, NewType, Tuple, TypedDict, Union +import sys +from typing import Any, AsyncGenerator, Generator, NewType, Tuple, Union + +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] @@ -11,4 +17,4 @@ __all__ = [ 'TypedDict', 'SHA256', 'CreateResult', -]
\ No newline at end of file +] |