summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/openai
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-04-23 17:34:42 +0200
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-04-23 17:34:42 +0200
commit74c399d675676938f31faf18174a98ed7a1709da (patch)
treed0c06f94dd1c5be203fb02b95e22c51ff976be88 /g4f/Provider/openai
parentAdd nodriver to docker (diff)
downloadgpt4free-74c399d675676938f31faf18174a98ed7a1709da.tar
gpt4free-74c399d675676938f31faf18174a98ed7a1709da.tar.gz
gpt4free-74c399d675676938f31faf18174a98ed7a1709da.tar.bz2
gpt4free-74c399d675676938f31faf18174a98ed7a1709da.tar.lz
gpt4free-74c399d675676938f31faf18174a98ed7a1709da.tar.xz
gpt4free-74c399d675676938f31faf18174a98ed7a1709da.tar.zst
gpt4free-74c399d675676938f31faf18174a98ed7a1709da.zip
Diffstat (limited to 'g4f/Provider/openai')
-rw-r--r--g4f/Provider/openai/har_file.py3
1 files changed, 2 insertions, 1 deletions
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: