diff --git a/README.md b/README.md index ff1d98d..9152025 100644 --- a/README.md +++ b/README.md @@ -435,7 +435,6 @@ adb devices ### 截图失败(黑屏) 这通常意味着应用正在显示敏感页面(支付、密码、银行类应用)。Agent 会自动检测并请求人工接管。 - ### 引用 @@ -448,4 +447,4 @@ adb devices journal={arXiv preprint arXiv:2411.00820}, year={2024} } -``` \ No newline at end of file +``` diff --git a/examples/basic_usage.py b/examples/basic_usage.py index 9e44122..55fbbb3 100644 --- a/examples/basic_usage.py +++ b/examples/basic_usage.py @@ -90,9 +90,9 @@ def example_multiple_tasks(): ] for task in tasks: - print(f"\n{'='*50}") + print(f"\n{'=' * 50}") print(f"任务: {task}") - print('='*50) + print("=" * 50) result = agent.run(task) print(f"结果: {result}") diff --git a/examples/demo_thinking.py b/examples/demo_thinking.py index 283cd0e..98295c6 100644 --- a/examples/demo_thinking.py +++ b/examples/demo_thinking.py @@ -11,9 +11,9 @@ from phone_agent.model import ModelConfig def main(): - print("="*60) + print("=" * 60) print("Phone Agent - Thinking 输出演示") - print("="*60) + print("=" * 60) # 配置模型 model_config = ModelConfig( @@ -38,9 +38,9 @@ def main(): print("\n📱 开始执行任务...\n") result = agent.run("打开小红书搜索美食攻略") - print("\n" + "="*60) + print("\n" + "=" * 60) print(f"📊 最终结果: {result}") - print("="*60) + print("=" * 60) if __name__ == "__main__": diff --git a/phone_agent/config/apps.py b/phone_agent/config/apps.py index c54613f..20deada 100644 --- a/phone_agent/config/apps.py +++ b/phone_agent/config/apps.py @@ -29,8 +29,7 @@ APP_PACKAGES: dict[str, str] = { "12306": "com.MobileTicket", "去哪儿": "com.Qunar", "去哪儿旅行": "com.Qunar", - "滴滴出行": "com.sdu.didi.psnger", - + "滴滴出行": "com.sdu.did.psnger", # Video & Entertainment "bilibili": "tv.danmaku.bili", "抖音": "com.ss.android.ugc.aweme", diff --git a/phone_agent/config/prompts.py b/phone_agent/config/prompts.py index a978107..6dc745d 100644 --- a/phone_agent/config/prompts.py +++ b/phone_agent/config/prompts.py @@ -1,10 +1,14 @@ """System prompts for the AI agent.""" + from datetime import datetime today = datetime.today() formatted_date = today.strftime("%Y年%m月%d日") -SYSTEM_PROMPT = "今天的日期是: " + formatted_date + ''' +SYSTEM_PROMPT = ( + "今天的日期是: " + + formatted_date + + """ 你是一个智能体分析专家,可以根据操作历史和当前状态图执行一系列操作来完成任务。 你必须严格按照要求输出以下格式: {think} @@ -67,4 +71,5 @@ SYSTEM_PROMPT = "今天的日期是: " + formatted_date + ''' 16. 在做游戏任务时如果在战斗页面如果有自动战斗一定要开启自动战斗,如果多轮历史状态相似要检查自动战斗是否开启。 17. 如果没有合适的搜索结果,可能是因为搜索页面不对,请返回到搜索页面的上一级尝试重新搜索,如果尝试三次返回上一级搜索后仍然没有符合要求的结果,执行 finish(message="原因")。 18. 在结束任务前请一定要仔细检查任务是否完整准确的完成,如果出现错选、漏选、多选的情况,请返回之前的步骤进行纠正。 -''' \ No newline at end of file +""" +)