From 74c399d675676938f31faf18174a98ed7a1709da Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Tue, 23 Apr 2024 17:34:42 +0200 Subject: Add conversation title change in gui Fix bug with multiple requests a .har in OpenaiChat --- g4f/Provider/openai/har_file.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'g4f/Provider/openai') diff --git a/g4f/Provider/openai/har_file.py b/g4f/Provider/openai/har_file.py index da25b637..6a34c97a 100644 --- a/g4f/Provider/openai/har_file.py +++ b/g4f/Provider/openai/har_file.py @@ -30,6 +30,7 @@ sessionUrl = "https://chat.openai.com/api/auth/session" chatArk: arkReq = None accessToken: str = None cookies: dict = None +headers: dict = None def readHAR(): dirPath = "./" @@ -130,7 +131,7 @@ def getN() -> str: return base64.b64encode(timestamp.encode()).decode() async def getArkoseAndAccessToken(proxy: str) -> tuple[str, str, dict, dict]: - global chatArk, accessToken, cookies + global chatArk, accessToken, cookies, headers if chatArk is None or accessToken is None: chatArk, accessToken, cookies, headers = readHAR() if chatArk is None: -- cgit v1.2.3