decrease auto completion attempts (#2356)

Co-authored-by: lawyzheng <lawyzheng1106@gmail.com>
This commit is contained in:
Shuchang Zheng
2025-05-15 18:24:58 -07:00
committed by GitHub
parent fb5ccc4016
commit ad4b63d946
2 changed files with 4 additions and 3 deletions

View File

@@ -16,7 +16,7 @@ DOWNLOAD_FILE_PREFIX = "downloads"
SAVE_DOWNLOADED_FILES_TIMEOUT = 180
GET_DOWNLOADED_FILES_TIMEOUT = 30
NAVIGATION_MAX_RETRY_TIME = 5
AUTO_COMPLETION_POTENTIAL_VALUES_COUNT = 5
AUTO_COMPLETION_POTENTIAL_VALUES_COUNT = 3
DROPDOWN_MENU_MAX_DISTANCE = 100
BROWSER_DOWNLOADING_SUFFIX = ".crdownload"
MAX_UPLOAD_FILE_COUNT = 50

View File

@@ -2125,8 +2125,8 @@ async def input_or_auto_complete_input(
# 3. try each potential values from #2
# 4. call LLM to tweak the orignal text according to the information from #3, then start #1 again
# FIXME: try the whole loop for twice now, to prevent too many LLM calls
MAX_AUTO_COMPLETE_ATTEMP = 2
# FIXME: try the whole loop for once now, to speed up skyvern
MAX_AUTO_COMPLETE_ATTEMP = 1
current_attemp = 0
current_value = text
result = AutoCompletionResult()
@@ -2227,6 +2227,7 @@ async def input_or_auto_complete_input(
tried_values.append(value)
whole_new_elements.extend(result.incremental_elements)
# WARN: currently, we don't trigger this logic because MAX_AUTO_COMPLETE_ATTEMP is 1, to speed up skyvern
if current_attemp < MAX_AUTO_COMPLETE_ATTEMP:
LOG.info(
"Ask LLM to tweak the current value based on tried input values",