@@ -189,7 +189,7 @@ async def get_chat_requirements(self):
189189 config = get_config (self .user_agent , self .req_token )
190190 p = get_requirements_token (config )
191191 data = {'p' : p }
192- r = await self .ss .post (url , headers = headers , json = data , timeout = 5 )
192+ r = await self .ss .post (url , headers = headers , json = data , timeout = 10 )
193193 if r .status_code == 200 :
194194 resp = r .json ()
195195
@@ -319,35 +319,33 @@ async def prepare_send_conversation(self):
319319 "time_since_loaded" : random .randint (50 , 500 ),
320320 "page_height" : random .randint (500 , 1000 ),
321321 "page_width" : random .randint (1000 , 2000 ),
322- "pixel_ratio" : 1.5 ,
323- "screen_height" : random . randint ( 800 , 1200 ) ,
324- "screen_width" : random . randint ( 1200 , 2200 ) ,
322+ "pixel_ratio" : 1 ,
323+ "screen_height" : 1440 ,
324+ "screen_width" : 2560 ,
325325 },
326326 "conversation_mode" : conversation_mode ,
327- "conversation_origin " : None ,
327+ "enable_message_followups " : False ,
328328 "force_paragen" : False ,
329329 "force_paragen_model_slug" : "" ,
330330 "force_rate_limit" : False ,
331331 "force_use_sse" : True ,
332- "history_and_training_disabled" : self .history_disabled ,
333332 "messages" : chat_messages ,
334333 "model" : self .req_model ,
335334 "paragen_cot_summary_display_override" : "allow" ,
336- "paragen_stream_type_override" : None ,
337335 "parent_message_id" : self .parent_message_id if self .parent_message_id else f"client-created-root" ,
338- "reset_rate_limits" : False ,
339- "suggestions" : [],
340336 "supported_encodings" : ["v1" ],
341337 "system_hints" : [],
342338 "timezone" : "America/Los_Angeles" ,
343339 "timezone_offset_min" : - 480 ,
344340 "variant_purpose" : "comparison_implicit" ,
345- "websocket_request_id" : f"{ uuid .uuid4 ()} " ,
346341 }
347342 if "image" in self .origin_model or "image" in self .req_model :
348343 self .chat_request ["system_hints" ].append ("picture_v2" )
349344 if self .conversation_id :
350345 self .chat_request ['conversation_id' ] = self .conversation_id
346+ if self .history_disabled :
347+ self .chat_request ["history_and_training_disabled" ] = True
348+
351349 return self .chat_request
352350
353351 async def send_conversation (self ):
0 commit comments