summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/Chatgpt4Online.py
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-04-17 10:33:23 +0200
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-04-17 10:33:23 +0200
commita2b5446b2e449f3107d9980d8eaac0a3ae07730f (patch)
treece1b1b8dc647d39f88242220db30c3636047d2fa /g4f/Provider/Chatgpt4Online.py
parentadd cohere provider. (diff)
downloadgpt4free-a2b5446b2e449f3107d9980d8eaac0a3ae07730f.tar
gpt4free-a2b5446b2e449f3107d9980d8eaac0a3ae07730f.tar.gz
gpt4free-a2b5446b2e449f3107d9980d8eaac0a3ae07730f.tar.bz2
gpt4free-a2b5446b2e449f3107d9980d8eaac0a3ae07730f.tar.lz
gpt4free-a2b5446b2e449f3107d9980d8eaac0a3ae07730f.tar.xz
gpt4free-a2b5446b2e449f3107d9980d8eaac0a3ae07730f.tar.zst
gpt4free-a2b5446b2e449f3107d9980d8eaac0a3ae07730f.zip
Diffstat (limited to 'g4f/Provider/Chatgpt4Online.py')
-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: