summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/Chatgpt4Online.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g4f/Provider/Chatgpt4Online.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/g4f/Provider/Chatgpt4Online.py b/g4f/Provider/Chatgpt4Online.py
index 169c936d..ff9a2c8f 100644
--- a/g4f/Provider/Chatgpt4Online.py
+++ b/g4f/Provider/Chatgpt4Online.py
@@ -6,6 +6,7 @@ from aiohttp import ClientSession
from ..typing import Messages, AsyncResult
from ..requests import get_args_from_browser
+from ..webdriver import WebDriver
from .base_provider import AsyncGeneratorProvider
from .helper import get_random_string
@@ -23,9 +24,10 @@ class Chatgpt4Online(AsyncGeneratorProvider):
model: str,
messages: Messages,
proxy: str = None,
+ webdriver: WebDriver = None,
**kwargs
) -> AsyncResult:
- args = get_args_from_browser(f"{cls.url}/chat/", proxy=proxy)
+ args = get_args_from_browser(f"{cls.url}/chat/", webdriver, proxy=proxy)
async with ClientSession(**args) as session:
if not cls._wpnonce:
async with session.get(f"{cls.url}/chat/", proxy=proxy) as response: