diff options
author | H Lohaus <hlohaus@users.noreply.github.com> | 2024-11-20 19:58:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-20 19:58:16 +0100 |
commit | ffb4b0d162cc29b1caa4539d854de37206804225 (patch) | |
tree | ea565c46ed908d2a6b4ef3fef1f100e68428aec3 /g4f/typing.py | |
parent | Update api.py (diff) | |
download | gpt4free-ffb4b0d162cc29b1caa4539d854de37206804225.tar gpt4free-ffb4b0d162cc29b1caa4539d854de37206804225.tar.gz gpt4free-ffb4b0d162cc29b1caa4539d854de37206804225.tar.bz2 gpt4free-ffb4b0d162cc29b1caa4539d854de37206804225.tar.lz gpt4free-ffb4b0d162cc29b1caa4539d854de37206804225.tar.xz gpt4free-ffb4b0d162cc29b1caa4539d854de37206804225.tar.zst gpt4free-ffb4b0d162cc29b1caa4539d854de37206804225.zip |
Diffstat (limited to 'g4f/typing.py')
-rw-r--r-- | g4f/typing.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/g4f/typing.py b/g4f/typing.py index 710fde4b..1bc71141 100644 --- a/g4f/typing.py +++ b/g4f/typing.py @@ -10,11 +10,13 @@ if sys.version_info >= (3, 8): from typing import TypedDict else: from typing_extensions import TypedDict + +from .providers.response import ResponseType SHA256 = NewType('sha_256_hash', str) -CreateResult = Iterator[str] -AsyncResult = AsyncIterator[str] -Messages = List[Dict[str, Union[str,List[Dict[str,Union[str,Dict[str,str]]]]]]] +CreateResult = Iterator[Union[str, ResponseType]] +AsyncResult = AsyncIterator[Union[str, ResponseType]] +Messages = List[Dict[str, Union[str, List[Dict[str, Union[str, Dict[str, str]]]]]]] Cookies = Dict[str, str] ImageType = Union[str, bytes, IO, Image, None] |