summaryrefslogtreecommitdiffstats
path: root/g4f/client/types.py
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-04-07 10:36:13 +0200
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-04-07 10:36:13 +0200
commitb35dfcd1b01c575b65e0299ef71d285dc8f41459 (patch)
treecfe5f4a390af62fafefd1d27ca2c82a23cdcab49 /g4f/client/types.py
parentUpdate Gemini.py (diff)
downloadgpt4free-b35dfcd1b01c575b65e0299ef71d285dc8f41459.tar
gpt4free-b35dfcd1b01c575b65e0299ef71d285dc8f41459.tar.gz
gpt4free-b35dfcd1b01c575b65e0299ef71d285dc8f41459.tar.bz2
gpt4free-b35dfcd1b01c575b65e0299ef71d285dc8f41459.tar.lz
gpt4free-b35dfcd1b01c575b65e0299ef71d285dc8f41459.tar.xz
gpt4free-b35dfcd1b01c575b65e0299ef71d285dc8f41459.tar.zst
gpt4free-b35dfcd1b01c575b65e0299ef71d285dc8f41459.zip
Diffstat (limited to 'g4f/client/types.py')
-rw-r--r--g4f/client/types.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/g4f/client/types.py b/g4f/client/types.py
index b21ff03a..100be432 100644
--- a/g4f/client/types.py
+++ b/g4f/client/types.py
@@ -1,9 +1,15 @@
+from __future__ import annotations
+
+import os
+
+from .stubs import ChatCompletion, ChatCompletionChunk
from ..providers.types import BaseProvider, ProviderType, FinishReason
-from typing import Union, Iterator
+from typing import Union, Iterator, AsyncIterator
ImageProvider = Union[BaseProvider, object]
Proxies = Union[dict, str]
IterResponse = Iterator[Union[ChatCompletion, ChatCompletionChunk]]
+AsyncIterResponse = AsyncIterator[Union[ChatCompletion, ChatCompletionChunk]]
class ClientProxyMixin():
def get_proxy(self) -> Union[str, None]:
@@ -21,9 +27,7 @@ class Client(ClientProxyMixin):
self,
api_key: str = None,
proxies: Proxies = None,
- provider: ProviderType = None,
- image_provider: ImageProvider = None,
**kwargs
) -> None:
self.api_key: str = api_key
- self.proxies: Proxies = proxies
+ self.proxies: Proxies = proxies \ No newline at end of file