@@ -331,7 +331,7 @@ async def prepare_send_conversation(self):
331331 "model" : self .req_model ,
332332 "paragen_cot_summary_display_override" : "allow" ,
333333 "paragen_stream_type_override" : None ,
334- "parent_message_id" : self .parent_message_id if self .parent_message_id else f"{ uuid . uuid4 () } " ,
334+ "parent_message_id" : self .parent_message_id if self .parent_message_id else f"client-created-root " ,
335335 "reset_rate_limits" : False ,
336336 "suggestions" : [],
337337 "supported_encodings" : [],
@@ -341,6 +341,8 @@ async def prepare_send_conversation(self):
341341 "variant_purpose" : "comparison_implicit" ,
342342 "websocket_request_id" : f"{ uuid .uuid4 ()} " ,
343343 }
344+ if "image" in self .origin_model or "image" in self .req_model :
345+ self .chat_request ["system_hints" ].append ("picture_v2" )
344346 if self .conversation_id :
345347 self .chat_request ['conversation_id' ] = self .conversation_id
346348 return self .chat_request
@@ -474,7 +476,7 @@ async def upload(self, upload_url, file_content, mime_type):
474476 headers .pop ('oai-device-id' , None )
475477 headers .pop ('oai-language' , None )
476478 try :
477- r = await self .s .put (upload_url , headers = headers , data = file_content , timeout = 60 )
479+ r = await self .s .put (upload_url , headers = headers , data = file_content , timeout = 120 )
478480 if r .status_code == 201 :
479481 return True
480482 else :
0 commit comments