Add any information that helps from the last message of CUA when there's no data extraction goal (#2149)
This commit is contained in:
@@ -12,6 +12,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
|
||||
"useful_information": str // If there is any useful information the assistant has provided that contributes to the user goal, put it here.
|
||||
}
|
||||
|
||||
User goal: {{ navigation_goal }}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user