summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/PerplexityAi.py
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2023-12-06 09:35:36 +0100
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2023-12-06 09:35:36 +0100
commit3576dee75a1623aa2385b6afe8b922ad5affca26 (patch)
treef54f68590875e4e67adaab03139f18167ffc7fa1 /g4f/Provider/PerplexityAi.py
parentAdd get_session_from_browser as cloudflare bypass (diff)
downloadgpt4free-3576dee75a1623aa2385b6afe8b922ad5affca26.tar
gpt4free-3576dee75a1623aa2385b6afe8b922ad5affca26.tar.gz
gpt4free-3576dee75a1623aa2385b6afe8b922ad5affca26.tar.bz2
gpt4free-3576dee75a1623aa2385b6afe8b922ad5affca26.tar.lz
gpt4free-3576dee75a1623aa2385b6afe8b922ad5affca26.tar.xz
gpt4free-3576dee75a1623aa2385b6afe8b922ad5affca26.tar.zst
gpt4free-3576dee75a1623aa2385b6afe8b922ad5affca26.zip
Diffstat (limited to '')
-rw-r--r--g4f/Provider/PerplexityAi.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/g4f/Provider/PerplexityAi.py b/g4f/Provider/PerplexityAi.py
index 941ca6d4..ad629aa8 100644
--- a/g4f/Provider/PerplexityAi.py
+++ b/g4f/Provider/PerplexityAi.py
@@ -1,6 +1,10 @@
from __future__ import annotations
import time
+from selenium.webdriver.common.by import By
+from selenium.webdriver.support.ui import WebDriverWait
+from selenium.webdriver.support import expected_conditions as EC
+from selenium.webdriver.common.keys import Keys
from ..typing import CreateResult, Messages
from .base_provider import BaseProvider
@@ -27,11 +31,6 @@ class PerplexityAi(BaseProvider):
**kwargs
) -> CreateResult:
with WebDriverSession(webdriver, "", virtual_display=virtual_display, proxy=proxy) as driver:
- from selenium.webdriver.common.by import By
- from selenium.webdriver.support.ui import WebDriverWait
- from selenium.webdriver.support import expected_conditions as EC
- from selenium.webdriver.common.keys import Keys
-
prompt = format_prompt(messages)
driver.get(f"{cls.url}/")