no need to complete verify for cached action anymore (#1756)
This commit is contained in:
@@ -120,6 +120,7 @@ class Action(BaseModel):
|
|||||||
text: str | None = None
|
text: str | None = None
|
||||||
option: SelectOption | None = None
|
option: SelectOption | None = None
|
||||||
is_checked: bool | None = None
|
is_checked: bool | None = None
|
||||||
|
verified: bool = False
|
||||||
|
|
||||||
created_at: datetime | None = None
|
created_at: datetime | None = None
|
||||||
modified_at: datetime | None = None
|
modified_at: datetime | None = None
|
||||||
|
|||||||
@@ -1291,27 +1291,6 @@ async def handle_complete_action(
|
|||||||
task: Task,
|
task: Task,
|
||||||
step: Step,
|
step: Step,
|
||||||
) -> list[ActionResult]:
|
) -> list[ActionResult]:
|
||||||
# If this action has a source_action_id, then we need to make sure if the goal is actually completed.
|
|
||||||
if action.source_action_id and task.navigation_goal:
|
|
||||||
LOG.info(
|
|
||||||
"CompleteAction has source_action_id, checking if goal is completed",
|
|
||||||
task_id=task.task_id,
|
|
||||||
step_id=step.step_id,
|
|
||||||
workflow_run_id=task.workflow_run_id,
|
|
||||||
)
|
|
||||||
verified_complete_action = await app.agent.check_user_goal_complete(page, scraped_page, task, step)
|
|
||||||
if verified_complete_action is None:
|
|
||||||
return [
|
|
||||||
ActionFailure(
|
|
||||||
exception=IllegitComplete(
|
|
||||||
data={
|
|
||||||
"error": "Cached complete action wasn't verified by LLM, fallback to default execution mode"
|
|
||||||
}
|
|
||||||
)
|
|
||||||
)
|
|
||||||
]
|
|
||||||
action.verified = True
|
|
||||||
|
|
||||||
if not action.verified and task.navigation_goal:
|
if not action.verified and task.navigation_goal:
|
||||||
LOG.info(
|
LOG.info(
|
||||||
"CompleteAction hasn't been verified, going to verify the user goal",
|
"CompleteAction hasn't been verified, going to verify the user goal",
|
||||||
|
|||||||
Reference in New Issue
Block a user