o ޾zf @sJddlZddlmZddZddZddZdd d Zd d Zd dZdS)N) encode_imagecC"g}d}|dd|dgg|S)NzYou are a helpful AI mobile phone operating assistant. You need to help me operate the phone to complete the user's instruction.systemtexttyperappendZoperation_historyZ sysetm_promptr 9E:\Desktop\Mobile-Agent-v2-demo-local\MobileAgent\chat.pyinit_action_chatr cCrNz6You are a helpful AI mobile phone operating assistant.rrrrr r r r init_reflect_chat rrcCrrrr r r r init_memory_chatrrcCsTt|}|rt|}d|dddd|idg}nd|dg}|||g|S)Nrr image_urlurldata:image/jpeg;base64,rrcopydeepcopyrr )roleprompt chat_historyimagenew_chat_historyZ base64_imagecontentr r r add_responses"  rcCsdt|}t|d}t|d}d|dddd|idddd|idg}|||g|S) Nrrrrrrrr)rrrrrZ base64_image1Z base64_image2rr r r add_response_two_image5s"     r!cCsXtd|D]}td|dt|ddddt|dddqtddS)Nzd****************************************************************************************************zrole:rr rz )printlen)rchatr r r print_statusQs . r&)N) rMobileAgent.apirr rrrr!r&r r r r s