Former-commit-id: a606f504b1
a606f504b1
@ -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")
@ -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: