From 1eb7dc05e59433de149ec16d9b2fe19b3fa4b24b Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Fri, 26 Jan 2024 12:49:52 +0100 Subject: Fix: ChromeDriver only supports characters in the BMP Add set_cookies helper, Show last used model --- g4f/Provider/needs_auth/Theb.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'g4f/Provider/needs_auth/Theb.py') diff --git a/g4f/Provider/needs_auth/Theb.py b/g4f/Provider/needs_auth/Theb.py index efb38a40..2930e35d 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 AbstractProvider from ..helper import format_prompt -from ...webdriver import WebDriver, WebDriverSession +from ...webdriver import WebDriver, WebDriverSession, element_send_text models = { "theb-ai": "TheB.AI", @@ -118,8 +118,7 @@ window._last_message = ""; # Submit prompt wait.until(EC.visibility_of_element_located((By.ID, "textareaAutosize"))) - driver.find_element(By.ID, "textareaAutosize").send_keys(prompt) - driver.find_element(By.ID, "textareaAutosize").send_keys(Keys.ENTER) + element_send_text(driver.find_element(By.ID, "textareaAutosize"), prompt) # Read response with reader script = """ -- cgit v1.2.3