From 1ebd8a55e9966adee1f1e4991b15a5ed162ef6e5 Mon Sep 17 00:00:00 2001 From: Kerem Yilmaz Date: Fri, 19 Jul 2024 14:27:57 -0700 Subject: [PATCH] iframe submit recognization (#628) --- skyvern/forge/agent.py | 2 +- skyvern/forge/prompts/skyvern/extract-action-claude3-sonnet.j2 | 2 +- skyvern/forge/prompts/skyvern/extract-action.j2 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/skyvern/forge/agent.py b/skyvern/forge/agent.py index f5875855..dd36fdcc 100644 --- a/skyvern/forge/agent.py +++ b/skyvern/forge/agent.py @@ -1073,7 +1073,7 @@ class ForgeAgent: ], } for action, results in actions_and_results - if len(results) > 0 and not results[-1].success + if len(results) > 0 ] ) diff --git a/skyvern/forge/prompts/skyvern/extract-action-claude3-sonnet.j2 b/skyvern/forge/prompts/skyvern/extract-action-claude3-sonnet.j2 index 8ffa3557..e913e92a 100644 --- a/skyvern/forge/prompts/skyvern/extract-action-claude3-sonnet.j2 +++ b/skyvern/forge/prompts/skyvern/extract-action-claude3-sonnet.j2 @@ -10,7 +10,7 @@ If you see a popup in the page screenshot, prioritize actions on the popup. Reply in JSON format with the following keys: { "user_goal_achieved": str, // A string that describes if user goal has been completed with reasoning. - "action_plan": str, // A string that describes the plan of actions you're going to take. Be specific and to the point. Use this as a quick summary of the actions you're going to take, and what order you're going to take them in, and how that moves you towards your overall goal. "COMPLETE" if user goal has been achieved. + "action_plan": str, // A string that describes the plan of actions you're going to take. Be specific and to the point. Use this as a quick summary of the actions you're going to take, and what order you're going to take them in, and how that moves you towards your overall goal. Output "COMPLETE" action in the "actions" if user goal has been achieved. "actions": array // An array of actions. Here's the format of each action: [{ "reasoning": str, // The reasoning behind the action. Be specific, referencing any user information and their fields and element ids in your reasoning. Mention why you chose the action type, and why you chose the element id. Keep the reasoning short and to the point. diff --git a/skyvern/forge/prompts/skyvern/extract-action.j2 b/skyvern/forge/prompts/skyvern/extract-action.j2 index a445861b..9fe04fa1 100644 --- a/skyvern/forge/prompts/skyvern/extract-action.j2 +++ b/skyvern/forge/prompts/skyvern/extract-action.j2 @@ -10,7 +10,7 @@ If you see a popup in the page screenshot, prioritize actions on the popup. Reply in JSON format with the following keys: { "user_goal_achieved": str, // A string that describes if user goal has been completed with reasoning. - "action_plan": str, // A string that describes the plan of actions you're going to take. Be specific and to the point. Use this as a quick summary of the actions you're going to take, and what order you're going to take them in, and how that moves you towards your overall goal. "COMPLETE" if user goal has been achieved. + "action_plan": str, // A string that describes the plan of actions you're going to take. Be specific and to the point. Use this as a quick summary of the actions you're going to take, and what order you're going to take them in, and how that moves you towards your overall goal. Output "COMPLETE" action in the "actions" if user goal has been achieved. "actions": array // An array of actions. Here's the format of each action: [{ "reasoning": str, // The reasoning behind the action. Be specific, referencing any user information and their fields and element ids in your reasoning. Mention why you chose the action type, and why you chose the element id. Keep the reasoning short and to the point.