From 2157ccbcdb5d781d389e24db332d2fb78b1159a9 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Sat, 2 Dec 2023 05:40:07 +0100 Subject: Add get_session_from_browser as cloudflare bypass --- g4f/Provider/needs_auth/Bard.py | 2 +- g4f/Provider/needs_auth/OpenaiChat.py | 2 +- g4f/Provider/needs_auth/Poe.py | 2 +- g4f/Provider/needs_auth/Theb.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'g4f/Provider/needs_auth') diff --git a/g4f/Provider/needs_auth/Bard.py b/g4f/Provider/needs_auth/Bard.py index 2c1f6121..877af37e 100644 --- a/g4f/Provider/needs_auth/Bard.py +++ b/g4f/Provider/needs_auth/Bard.py @@ -5,7 +5,7 @@ import time from ...typing import CreateResult, Messages from ..base_provider import BaseProvider from ..helper import format_prompt -from ..webdriver import WebDriver, WebDriverSession +from ...webdriver import WebDriver, WebDriverSession class Bard(BaseProvider): url = "https://bard.google.com" diff --git a/g4f/Provider/needs_auth/OpenaiChat.py b/g4f/Provider/needs_auth/OpenaiChat.py index 8c9dd1e0..af62382a 100644 --- a/g4f/Provider/needs_auth/OpenaiChat.py +++ b/g4f/Provider/needs_auth/OpenaiChat.py @@ -7,7 +7,7 @@ from async_property import async_cached_property from ..base_provider import AsyncGeneratorProvider from ..helper import get_event_loop -from ..webdriver import get_browser +from ...webdriver import get_browser from ...typing import AsyncResult, Messages from ...requests import StreamSession diff --git a/g4f/Provider/needs_auth/Poe.py b/g4f/Provider/needs_auth/Poe.py index 99f6945b..200ded3b 100644 --- a/g4f/Provider/needs_auth/Poe.py +++ b/g4f/Provider/needs_auth/Poe.py @@ -5,7 +5,7 @@ import time from ...typing import CreateResult, Messages from ..base_provider import BaseProvider from ..helper import format_prompt -from ..webdriver import WebDriver, WebDriverSession +from ...webdriver import WebDriver, WebDriverSession models = { "meta-llama/Llama-2-7b-chat-hf": {"name": "Llama-2-7b"}, diff --git a/g4f/Provider/needs_auth/Theb.py b/g4f/Provider/needs_auth/Theb.py index 49ee174b..82eac6e2 100644 --- a/g4f/Provider/needs_auth/Theb.py +++ b/g4f/Provider/needs_auth/Theb.py @@ -5,7 +5,7 @@ import time from ...typing import CreateResult, Messages from ..base_provider import BaseProvider from ..helper import format_prompt -from ..webdriver import WebDriver, WebDriverSession +from ...webdriver import WebDriver, WebDriverSession models = { "theb-ai": "TheB.AI", -- cgit v1.2.3