remove cache actions (#4015)
This commit is contained in:
@@ -116,7 +116,6 @@ from skyvern.webeye.actions.actions import (
|
||||
TerminateAction,
|
||||
WebAction,
|
||||
)
|
||||
from skyvern.webeye.actions.caching import retrieve_action_plan
|
||||
from skyvern.webeye.actions.handler import ActionHandler
|
||||
from skyvern.webeye.actions.models import DetailedAgentStepOutput
|
||||
from skyvern.webeye.actions.parse_actions import (
|
||||
@@ -1002,15 +1001,8 @@ class ForgeAgent:
|
||||
)
|
||||
|
||||
else:
|
||||
using_cached_action_plan = False
|
||||
if not task.navigation_goal and not isinstance(task_block, ValidationBlock):
|
||||
actions = [await self.create_extract_action(task, step, scraped_page)]
|
||||
elif (
|
||||
task_block
|
||||
and task_block.cache_actions
|
||||
and (actions := await retrieve_action_plan(task, step, scraped_page))
|
||||
):
|
||||
using_cached_action_plan = True
|
||||
else:
|
||||
llm_key_override = task.llm_key
|
||||
# FIXME: Redundant engine check?
|
||||
@@ -1124,7 +1116,7 @@ class ForgeAgent:
|
||||
wait_actions_len = len(wait_actions_to_skip)
|
||||
# if there are wait actions and there are other actions in the list, skip wait actions
|
||||
# if we are using cached action plan, we don't skip wait actions
|
||||
if wait_actions_len > 0 and wait_actions_len < len(actions) and not using_cached_action_plan:
|
||||
if wait_actions_len > 0 and wait_actions_len < len(actions):
|
||||
actions = [action for action in actions if action.action_type != ActionType.WAIT]
|
||||
LOG.info(
|
||||
"Skipping wait actions",
|
||||
|
||||
@@ -228,7 +228,6 @@ workflow_definition:
|
||||
parameter_keys: []
|
||||
totp_identifier: null
|
||||
totp_verification_url: null
|
||||
cache_actions: false
|
||||
complete_criterion: ""
|
||||
terminate_criterion: ""
|
||||
include_action_history_in_verification: false
|
||||
@@ -242,7 +241,6 @@ workflow_definition:
|
||||
max_retries: 0
|
||||
max_steps_per_run: null
|
||||
parameter_keys: []
|
||||
cache_actions: false
|
||||
'
|
||||
"""
|
||||
CREATE_WORKFLOW_CODE_SAMPLE_PYTHON = """
|
||||
@@ -305,7 +303,6 @@ workflow_definition = {
|
||||
"parameter_keys": [],
|
||||
"totp_identifier": None,
|
||||
"totp_verification_url": None,
|
||||
"cache_actions": False,
|
||||
"complete_criterion": "",
|
||||
"terminate_criterion": "",
|
||||
"include_action_history_in_verification": False,
|
||||
@@ -321,7 +318,6 @@ workflow_definition = {
|
||||
"max_retries": 0,
|
||||
"max_steps_per_run": None,
|
||||
"parameter_keys": [],
|
||||
"cache_actions": False,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -391,7 +387,6 @@ const workflowDefinition = {
|
||||
parameter_keys: [],
|
||||
totp_identifier: null,
|
||||
totp_verification_url: null,
|
||||
cache_actions: false,
|
||||
complete_criterion: "",
|
||||
terminate_criterion: "",
|
||||
include_action_history_in_verification: false
|
||||
@@ -407,7 +402,6 @@ const workflowDefinition = {
|
||||
max_retries: 0,
|
||||
max_steps_per_run: null,
|
||||
parameter_keys: [],
|
||||
cache_actions: false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -484,7 +478,6 @@ workflow_definition:
|
||||
parameter_keys: []
|
||||
totp_identifier: null
|
||||
totp_verification_url: null
|
||||
cache_actions: false
|
||||
complete_criterion: ""
|
||||
terminate_criterion: ""
|
||||
include_action_history_in_verification: false
|
||||
@@ -498,7 +491,6 @@ workflow_definition:
|
||||
max_retries: 0
|
||||
max_steps_per_run: null
|
||||
parameter_keys: []
|
||||
cache_actions: false
|
||||
'
|
||||
"""
|
||||
UPDATE_WORKFLOW_CODE_SAMPLE_PYTHON = """
|
||||
@@ -560,7 +552,6 @@ updated_workflow_definition = {
|
||||
"parameter_keys": [],
|
||||
"totp_identifier": None,
|
||||
"totp_verification_url": None,
|
||||
"cache_actions": False,
|
||||
"complete_criterion": "",
|
||||
"terminate_criterion": "",
|
||||
"include_action_history_in_verification": False,
|
||||
@@ -576,7 +567,6 @@ updated_workflow_definition = {
|
||||
"max_retries": 0,
|
||||
"max_steps_per_run": None,
|
||||
"parameter_keys": [],
|
||||
"cache_actions": False,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -645,7 +635,6 @@ const updatedWorkflowDefinition = {
|
||||
parameter_keys: [],
|
||||
totp_identifier: null,
|
||||
totp_verification_url: null,
|
||||
cache_actions: false,
|
||||
complete_criterion: "",
|
||||
terminate_criterion: "",
|
||||
include_action_history_in_verification: false
|
||||
@@ -660,8 +649,7 @@ const updatedWorkflowDefinition = {
|
||||
data_schema: null,
|
||||
max_retries: 0,
|
||||
max_steps_per_run: null,
|
||||
parameter_keys: [],
|
||||
cache_actions: false
|
||||
parameter_keys: []
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -458,7 +458,6 @@ class BaseTaskBlock(Block):
|
||||
download_suffix: str | None = None
|
||||
totp_verification_url: str | None = None
|
||||
totp_identifier: str | None = None
|
||||
cache_actions: bool = False
|
||||
complete_verification: bool = True
|
||||
include_action_history_in_verification: bool = False
|
||||
download_timeout: float | None = None # minutes
|
||||
|
||||
@@ -2870,7 +2870,6 @@ class WorkflowService:
|
||||
continue_on_failure=block_yaml.continue_on_failure,
|
||||
totp_verification_url=block_yaml.totp_verification_url,
|
||||
totp_identifier=block_yaml.totp_identifier,
|
||||
cache_actions=block_yaml.cache_actions,
|
||||
disable_cache=block_yaml.disable_cache,
|
||||
complete_criterion=block_yaml.complete_criterion,
|
||||
terminate_criterion=block_yaml.terminate_criterion,
|
||||
@@ -3050,7 +3049,6 @@ class WorkflowService:
|
||||
continue_on_failure=block_yaml.continue_on_failure,
|
||||
totp_verification_url=block_yaml.totp_verification_url,
|
||||
totp_identifier=block_yaml.totp_identifier,
|
||||
cache_actions=block_yaml.cache_actions,
|
||||
disable_cache=block_yaml.disable_cache,
|
||||
# DO NOT run complete verification for action block
|
||||
complete_verification=False,
|
||||
@@ -3080,7 +3078,6 @@ class WorkflowService:
|
||||
continue_on_failure=block_yaml.continue_on_failure,
|
||||
totp_verification_url=block_yaml.totp_verification_url,
|
||||
totp_identifier=block_yaml.totp_identifier,
|
||||
cache_actions=block_yaml.cache_actions,
|
||||
disable_cache=block_yaml.disable_cache,
|
||||
complete_criterion=block_yaml.complete_criterion,
|
||||
terminate_criterion=block_yaml.terminate_criterion,
|
||||
@@ -3122,7 +3119,6 @@ class WorkflowService:
|
||||
max_retries=block_yaml.max_retries,
|
||||
model=block_yaml.model,
|
||||
continue_on_failure=block_yaml.continue_on_failure,
|
||||
cache_actions=block_yaml.cache_actions,
|
||||
disable_cache=block_yaml.disable_cache,
|
||||
complete_verification=False,
|
||||
)
|
||||
@@ -3148,7 +3144,6 @@ class WorkflowService:
|
||||
continue_on_failure=block_yaml.continue_on_failure,
|
||||
totp_verification_url=block_yaml.totp_verification_url,
|
||||
totp_identifier=block_yaml.totp_identifier,
|
||||
cache_actions=block_yaml.cache_actions,
|
||||
disable_cache=block_yaml.disable_cache,
|
||||
complete_criterion=block_yaml.complete_criterion,
|
||||
terminate_criterion=block_yaml.terminate_criterion,
|
||||
@@ -3188,7 +3183,6 @@ class WorkflowService:
|
||||
continue_on_failure=block_yaml.continue_on_failure,
|
||||
totp_verification_url=block_yaml.totp_verification_url,
|
||||
totp_identifier=block_yaml.totp_identifier,
|
||||
cache_actions=block_yaml.cache_actions,
|
||||
disable_cache=block_yaml.disable_cache,
|
||||
complete_on_download=True,
|
||||
complete_verification=True,
|
||||
|
||||
Reference in New Issue
Block a user