ai_adapt_value -> ai_infer (#3359)

This commit is contained in:
Shuchang Zheng
2025-09-04 10:51:41 -07:00
committed by GitHub
parent 3299a9fcdd
commit f32c1c15d4
2 changed files with 7 additions and 7 deletions

View File

@@ -271,7 +271,7 @@ def _action_to_stmt(act: dict[str, Any], assign_to_output: bool = False) -> cst.
)
args.append(
cst.Arg(
keyword=cst.Name("ai_adapt_value"),
keyword=cst.Name("ai_infer"),
value=cst.Name("True"),
whitespace_after_arg=cst.ParenthesizedWhitespace(
indent=True,

View File

@@ -339,30 +339,30 @@ class SkyvernPage:
self,
xpath: str,
value: str,
ai_adapt_value: bool = False,
ai_infer: bool = False,
intention: str | None = None,
data: str | dict[str, Any] | None = None,
timeout: float = settings.BROWSER_ACTION_TIMEOUT_MS,
) -> None:
await self._input_text(xpath, value, ai_adapt_value, intention, data, timeout)
await self._input_text(xpath, value, ai_infer, intention, data, timeout)
@action_wrap(ActionType.INPUT_TEXT)
async def type(
self,
xpath: str,
value: str,
ai_adapt_value: bool = False,
ai_infer: bool = False,
intention: str | None = None,
data: str | dict[str, Any] | None = None,
timeout: float = settings.BROWSER_ACTION_TIMEOUT_MS,
) -> None:
await self._input_text(xpath, value, ai_adapt_value, intention, data, timeout)
await self._input_text(xpath, value, ai_infer, intention, data, timeout)
async def _input_text(
self,
xpath: str,
value: str,
ai_adapt_value: bool = False,
ai_infer: bool = False,
intention: str | None = None,
data: str | dict[str, Any] | None = None,
timeout: float = settings.BROWSER_ACTION_TIMEOUT_MS,
@@ -383,7 +383,7 @@ class SkyvernPage:
if context and context.workflow_run_id:
value = await _get_actual_value_of_parameter_if_secret(context.workflow_run_id, value)
if ai_adapt_value and intention:
if ai_infer and intention:
try:
prompt = context.prompt if context else None
# Build the element tree of the current page for the prompt