Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
apply scroll_amount_multiplier (#2268)
Shuchang Zhengd107a7563cf0
diff --git a/skyvern/constants.py b/skyvern/constants.pyindex 1415ccd8d..d3afa40f3 100644--- a/skyvern/constants.py+++ b/skyvern/constants.py@@ -34,3 +34,4 @@ class ScrapeType(StrEnum):SCRAPE_TYPE_ORDER = [ScrapeType.NORMAL, ScrapeType.NORMAL, ScrapeType.RELOAD]DEFAULT_MAX_TOKENS = 100000MAX_IMAGE_MESSAGES = 10+SCROLL_AMOUNT_MULTIPLIER = 100diff --git a/skyvern/webeye/actions/parse_actions.py b/skyvern/webeye/actions/parse_actions.pyindex 935104ab6..ab8f599d3 100644--- a/skyvern/webeye/actions/parse_actions.py+++ b/skyvern/webeye/actions/parse_actions.py@@ -4,6 +4,7 @@ import structlogfrom openai.types.responses.response import Response as OpenAIResponsefrom pydantic import ValidationError+from skyvern.constants import SCROLL_AMOUNT_MULTIPLIERfrom skyvern.exceptions import NoTOTPVerificationCodeFound, UnsupportedActionTypefrom skyvern.forge import appfrom skyvern.forge.prompts import prompt_engine@@ -552,15 +553,15 @@ async def parse_anthropic_actions(scroll_amount = tool_call_input.get("scroll_amount")if scroll_direction == "up":scroll_x = 0- scroll_y = -scroll_amount+ scroll_y = -scroll_amount * SCROLL_AMOUNT_MULTIPLIERelif scroll_direction == "down":scroll_x = 0- scroll_y = scroll_amount+ scroll_y = scroll_amount * SCROLL_AMOUNT_MULTIPLIERelif scroll_direction == "left":- scroll_x = -scroll_amount+ scroll_x = -scroll_amount * SCROLL_AMOUNT_MULTIPLIERscroll_y = 0elif scroll_direction == "right":- scroll_x = scroll_amount+ scroll_x = scroll_amount * SCROLL_AMOUNT_MULTIPLIERscroll_y = 0else:LOG.warning(