decrease auto completion attempts (#2356)
Co-authored-by: lawyzheng <lawyzheng1106@gmail.com>
This commit is contained in:
@@ -16,7 +16,7 @@ DOWNLOAD_FILE_PREFIX = "downloads"
|
|||||||
SAVE_DOWNLOADED_FILES_TIMEOUT = 180
|
SAVE_DOWNLOADED_FILES_TIMEOUT = 180
|
||||||
GET_DOWNLOADED_FILES_TIMEOUT = 30
|
GET_DOWNLOADED_FILES_TIMEOUT = 30
|
||||||
NAVIGATION_MAX_RETRY_TIME = 5
|
NAVIGATION_MAX_RETRY_TIME = 5
|
||||||
AUTO_COMPLETION_POTENTIAL_VALUES_COUNT = 5
|
AUTO_COMPLETION_POTENTIAL_VALUES_COUNT = 3
|
||||||
DROPDOWN_MENU_MAX_DISTANCE = 100
|
DROPDOWN_MENU_MAX_DISTANCE = 100
|
||||||
BROWSER_DOWNLOADING_SUFFIX = ".crdownload"
|
BROWSER_DOWNLOADING_SUFFIX = ".crdownload"
|
||||||
MAX_UPLOAD_FILE_COUNT = 50
|
MAX_UPLOAD_FILE_COUNT = 50
|
||||||
|
|||||||
@@ -2125,8 +2125,8 @@ async def input_or_auto_complete_input(
|
|||||||
# 3. try each potential values from #2
|
# 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
|
# 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
|
# FIXME: try the whole loop for once now, to speed up skyvern
|
||||||
MAX_AUTO_COMPLETE_ATTEMP = 2
|
MAX_AUTO_COMPLETE_ATTEMP = 1
|
||||||
current_attemp = 0
|
current_attemp = 0
|
||||||
current_value = text
|
current_value = text
|
||||||
result = AutoCompletionResult()
|
result = AutoCompletionResult()
|
||||||
@@ -2227,6 +2227,7 @@ async def input_or_auto_complete_input(
|
|||||||
tried_values.append(value)
|
tried_values.append(value)
|
||||||
whole_new_elements.extend(result.incremental_elements)
|
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:
|
if current_attemp < MAX_AUTO_COMPLETE_ATTEMP:
|
||||||
LOG.info(
|
LOG.info(
|
||||||
"Ask LLM to tweak the current value based on tried input values",
|
"Ask LLM to tweak the current value based on tried input values",
|
||||||
|
|||||||
Reference in New Issue
Block a user