Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert 'add elements to dropdown confirm prompt' #807

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions skyvern/forge/prompts/skyvern/opened-dropdown-confirm.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,4 @@ Reply in JSON format with the following keys:
{
"reasoning": str, // the reason why it's a dropdown menu or not a dropdown menu
"is_opened_dropdown_menu": bool, // true if it's a opened dropdown menu, otherwise false.
}

Elements on the screenshot:
```
{{ elements }}
```
}
7 changes: 2 additions & 5 deletions skyvern/webeye/actions/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1661,11 +1661,8 @@ async def locate_dropdown_menu(
timeout=SettingsManager.get_settings().BROWSER_SCREENSHOT_TIMEOUT_MS
)

# only for detecting the dropdown menu, better to send untrimmed HTML without skyvern attributes
dropdown_confirm_prompt = prompt_engine.load_prompt(
"opened-dropdown-confirm",
elements=head_element.build_HTML(need_trim_element=False, need_skyvern_attrs=False),
)
# TODO: better to send untrimmed HTML without skyvern attributes in the future
dropdown_confirm_prompt = prompt_engine.load_prompt("opened-dropdown-confirm")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the elements from the prompt might affect the accuracy of dropdown detection. Consider if this change aligns with the intended functionality.

LOG.debug(
"Confirm if it's an opened dropdown menu",
step_id=step.step_id,
Expand Down
Loading