From efb4bb876c82598d424930795f94557567503157 Mon Sep 17 00:00:00 2001 From: Zack Date: Tue, 24 Oct 2023 19:40:24 -0500 Subject: [PATCH] feat: remove cookies.json requirement, update env Former-commit-id: a606f504b1dec155d0dbf2354d92e084dd4adb60 --- main.py | 4 +--- swarms/models/bing_chat.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 96d02e3c..799ebd81 100644 --- a/main.py +++ b/main.py @@ -10,9 +10,7 @@ from swarms.models.bing_chat import BingChat dotenv.load_dotenv(".env") # Initialize the EdgeGPTModel -cookie = os.environ.get("BING_COOKIE") -auth = os.environ.get("AUTH_COOKIE") -model = BingChat(cookies_path="./cookies.json", bing_cookie="BING_COOKIE",auth_cookie="AUTH_COOKIE") +model = BingChat() response = model("Generate") diff --git a/swarms/models/bing_chat.py b/swarms/models/bing_chat.py index 4c7de939..7135ba45 100644 --- a/swarms/models/bing_chat.py +++ b/swarms/models/bing_chat.py @@ -28,7 +28,7 @@ class BingChat: def __init__(self, cookies_path: str = None, auth_cookie: str = None, auth_cookie_SRCHHPGUSR: str = None): auth_cookie = os.environ("AUTH_COOKIE") - auth_cookie_SRCHHPGUSR + auth_cookie_SRCHHPGUSR = os.enviro("AUTH_COOKIE_SRCHHPGUSR") if cookies_path: self.cookies = json.loads(open(cookies_path, encoding="utf-8").read()) elif auth_cookie: