From ff801253143dce866491c3f4c078bc785e466fd5 Mon Sep 17 00:00:00 2001 From: Shuchang Zheng Date: Mon, 14 Apr 2025 13:56:13 -0700 Subject: [PATCH] shu/cua other action (#2154) --- skyvern/forge/prompts/skyvern/cua-fallback-action.j2 | 2 +- skyvern/webeye/actions/handler.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/skyvern/forge/prompts/skyvern/cua-fallback-action.j2 b/skyvern/forge/prompts/skyvern/cua-fallback-action.j2 index dda38c46..1e7dcf25 100644 --- a/skyvern/forge/prompts/skyvern/cua-fallback-action.j2 +++ b/skyvern/forge/prompts/skyvern/cua-fallback-action.j2 @@ -11,7 +11,7 @@ Help the user decide what to do next based on the assistant's message. Here's th Return the action to take next in the following JSON format: { - "action": str // complete, terminate, solve_captcha, get_verification_code + "action": str // complete, terminate, solve_captcha, get_verification_code, other "useful_information": str // If there is any useful information the assistant has provided that contributes to the user goal, put it here. } diff --git a/skyvern/webeye/actions/handler.py b/skyvern/webeye/actions/handler.py index c58fcc50..2223c41e 100644 --- a/skyvern/webeye/actions/handler.py +++ b/skyvern/webeye/actions/handler.py @@ -1439,6 +1439,12 @@ async def handle_complete_action( workflow_run_id=task.workflow_run_id, ) action.verified = True + if not task.data_extraction_goal and verification_result.thoughts: + await app.DATABASE.update_task( + task.task_id, + organization_id=task.organization_id, + extracted_information=verification_result.thoughts, + ) return [ActionSuccess()]