summaryrefslogtreecommitdiffstats
path: root/g4f/requests/aiohttp.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g4f/requests/aiohttp.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/g4f/requests/aiohttp.py b/g4f/requests/aiohttp.py
index 71e7bde7..cdbedef3 100644
--- a/g4f/requests/aiohttp.py
+++ b/g4f/requests/aiohttp.py
@@ -33,9 +33,14 @@ class StreamSession(ClientSession):
**DEFAULT_HEADERS,
**headers
}
+ connect = None
+ if isinstance(timeout, tuple):
+ connect, timeout = timeout;
+ if timeout is not None:
+ timeout = ClientTimeout(timeout, connect)
super().__init__(
**kwargs,
- timeout=ClientTimeout(timeout) if timeout else None,
+ timeout=timeout,
response_class=StreamResponse,
connector=get_connector(connector, proxies.get("all", proxies.get("https"))),
headers=headers