summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/Liaobots.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g4f/Provider/Liaobots.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/g4f/Provider/Liaobots.py b/g4f/Provider/Liaobots.py
index 5151c115..e93642ba 100644
--- a/g4f/Provider/Liaobots.py
+++ b/g4f/Provider/Liaobots.py
@@ -2,10 +2,11 @@ from __future__ import annotations
import uuid
-from aiohttp import ClientSession
+from aiohttp import ClientSession, BaseConnector
from ..typing import AsyncResult, Messages
from .base_provider import AsyncGeneratorProvider, ProviderModelMixin
+from .helper import get_connector
models = {
"gpt-4": {
@@ -91,6 +92,7 @@ class Liaobots(AsyncGeneratorProvider, ProviderModelMixin):
messages: Messages,
auth: str = None,
proxy: str = None,
+ connector: BaseConnector = None,
**kwargs
) -> AsyncResult:
headers = {
@@ -102,7 +104,8 @@ class Liaobots(AsyncGeneratorProvider, ProviderModelMixin):
}
async with ClientSession(
headers=headers,
- cookie_jar=cls._cookie_jar
+ cookie_jar=cls._cookie_jar,
+ connector=get_connector(connector, proxy)
) as session:
cls._auth_code = auth if isinstance(auth, str) else cls._auth_code
if not cls._auth_code: