summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/openai
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-05-15 02:27:51 +0200
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-05-15 02:27:51 +0200
commit59fcf9d2d3be66c5988731f8e8ffa707d01c6539 (patch)
tree5329c60685eca0a15d86ff1d3193fee25eb864ca /g4f/Provider/openai
parentMerge pull request #1934 from krishna2206/main (diff)
downloadgpt4free-59fcf9d2d3be66c5988731f8e8ffa707d01c6539.tar
gpt4free-59fcf9d2d3be66c5988731f8e8ffa707d01c6539.tar.gz
gpt4free-59fcf9d2d3be66c5988731f8e8ffa707d01c6539.tar.bz2
gpt4free-59fcf9d2d3be66c5988731f8e8ffa707d01c6539.tar.lz
gpt4free-59fcf9d2d3be66c5988731f8e8ffa707d01c6539.tar.xz
gpt4free-59fcf9d2d3be66c5988731f8e8ffa707d01c6539.tar.zst
gpt4free-59fcf9d2d3be66c5988731f8e8ffa707d01c6539.zip
Diffstat (limited to '')
-rw-r--r--g4f/Provider/openai/har_file.py2
-rw-r--r--g4f/Provider/openai/proofofwork.py7
2 files changed, 3 insertions, 6 deletions
diff --git a/g4f/Provider/openai/har_file.py b/g4f/Provider/openai/har_file.py
index 6a34c97a..220c20bf 100644
--- a/g4f/Provider/openai/har_file.py
+++ b/g4f/Provider/openai/har_file.py
@@ -26,7 +26,7 @@ class arkReq:
self.userAgent = userAgent
arkPreURL = "https://tcr9i.chat.openai.com/fc/gt2/public_key/35536E1E-65B4-4D96-9D97-6ADB7EFF8147"
-sessionUrl = "https://chat.openai.com/api/auth/session"
+sessionUrl = "https://chatgpt.com/api/auth/session"
chatArk: arkReq = None
accessToken: str = None
cookies: dict = None
diff --git a/g4f/Provider/openai/proofofwork.py b/g4f/Provider/openai/proofofwork.py
index e44ef6f7..51d96bc4 100644
--- a/g4f/Provider/openai/proofofwork.py
+++ b/g4f/Provider/openai/proofofwork.py
@@ -16,12 +16,9 @@ def generate_proof_token(required: bool, seed: str, difficulty: str, user_agent:
# Get current UTC time
now_utc = datetime.now(timezone.utc)
- # Convert UTC time to Eastern Time
- now_et = now_utc.astimezone(timezone(timedelta(hours=-5)))
+ parse_time = now_utc.strftime('%a, %d %b %Y %H:%M:%S GMT')
- parse_time = now_et.strftime('%a, %d %b %Y %H:%M:%S GMT')
-
- config = [core + screen, parse_time, 4294705152, 0, user_agent]
+ config = [core + screen, parse_time, None, 0, user_agent, "https://tcr9i.chat.openai.com/v2/35536E1E-65B4-4D96-9D97-6ADB7EFF8147/api.js","dpl=53d243de46ff04dadd88d293f088c2dd728f126f","en","en-US",442,"pluginsāˆ’[object PluginArray]","","alert"]
diff_len = len(difficulty) // 2