Add any information that helps from the last message of CUA when there's no data extraction goal (#2149)

This commit is contained in:
Shuchang Zheng
2025-04-13 02:50:07 -07:00
committed by GitHub
parent 50dc41c7cc
commit 1ed5f22200
2 changed files with 8 additions and 0 deletions

View File

@@ -331,12 +331,19 @@ async def parse_cua_actions(
prompt_name="cua-fallback-action",
)
skyvern_action_type = action_response.get("action")
useful_information = action_response.get("useful_information")
action = WaitAction(
seconds=5,
reasoning=reasoning,
intention=reasoning,
)
if skyvern_action_type == "complete":
if not task.data_extraction_goal and useful_information:
await app.DATABASE.update_task(
task.task_id,
organization_id=task.organization_id,
extracted_information=useful_information,
)
action = CompleteAction(
reasoning=reasoning,
intention=reasoning,