summaryrefslogtreecommitdiffstats
path: root/g4f/typing.py
diff options
context:
space:
mode:
Diffstat (limited to 'g4f/typing.py')
-rw-r--r--g4f/typing.py8
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]