summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/openai
diff options
context:
space:
mode:
Diffstat (limited to 'g4f/Provider/openai')
-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