From 3576dee75a1623aa2385b6afe8b922ad5affca26 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Wed, 6 Dec 2023 09:35:36 +0100 Subject: Add selenium to dockerfile Load model and provider list in gui Remove needs_auth in HuggingChat Add default model and login url in gui --- g4f/Provider/PerplexityAi.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'g4f/Provider/PerplexityAi.py') 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}/") -- cgit v1.2.3