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

cleanup_element_tree_factory compatibility without task/step #1252

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

wintonzheng
Copy link
Contributor

@wintonzheng wintonzheng commented Nov 24, 2024

Important

Adds run_observer function, makes task and step optional in agent functions, and introduces new prompt templates.

  • New Functionality:
    • Adds run_observer() in scripts/run_observer.py, an async function to handle user prompts and create workflows.
    • Uses generate_navigation_url.j2 and observer.j2 templates for prompt generation.
  • Agent Functions:
    • Modifies _convert_svg_to_string() and _convert_css_shape_to_string() in agent_functions.py to make task and step parameters optional.
    • Updates cleanup_element_tree_factory() to use modified conversion functions.
  • Prompts:
    • Adds generate_navigation_url.j2 for URL generation based on user goals.
    • Adds observer.j2 for planning tasks based on DOM elements and user goals.
  • Misc:
    • Removes organization parameter from _scrape_with_type() and _build_and_record_step_prompt() in agent.py.

This description was created by Ellipsis for face022. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to 108fd5d in 19 seconds

More details
  • Looked at 185 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern/webeye/scraper/domUtils.js:254
  • Draft comment:
    Ensure element.className is not null or undefined before calling toString() to prevent potential runtime errors.
  • Reason this comment was not posted:
    Comment did not seem useful.

Workflow ID: wflow_pQ6svyOhFZcwFPcP


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on 108fd5d in 18 seconds

More details
  • Looked at 185 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern/webeye/scraper/domUtils.js:254
  • Draft comment:
    Ensure element.className is not null or undefined before calling toString() to prevent runtime errors.
  • Reason this comment was not posted:
    Comment did not seem useful.

Workflow ID: wflow_l69zD0I4PiopHUoG


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@wintonzheng wintonzheng changed the title run observer cleanup_element_tree_factory compatibility without task/step Nov 24, 2024
<!-- ELLIPSIS_HIDDEN -->

> [!IMPORTANT]
> Adds `run_observer` function for handling user prompts and workflow creation, updates agent functions for optional task/step parameters, and introduces new prompt templates.
>
>   - **New Functionality**:
>     - Adds `run_observer()` in `scripts/run_observer.py`, an async function to handle user prompts and create workflows.
>     - Uses `generate_navigation_url.j2` and `observer.j2` templates for prompt generation.
>   - **Agent Functions**:
>     - Modifies `_convert_svg_to_string()` and `_convert_css_shape_to_string()` in `agent_functions.py` to make `task` and `step` parameters optional.
>     - Updates `cleanup_element_tree_factory()` to use modified conversion functions.
>   - **Prompts**:
>     - Adds `generate_navigation_url.j2` for URL generation based on user goals.
>     - Adds `observer.j2` for planning tasks based on DOM elements and user goals.
>
> <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=Skyvern-AI%2Fskyvern-cloud&utm_source=github&utm_medium=referral)<sup> for a4b308e8b91551a4a08a40b84ace74cd2e90259b. It will automatically update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on 512fc34 in 27 seconds

More details
  • Looked at 171 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern/forge/agent_functions.py:110
  • Draft comment:
    Consider checking if task and step are not None before logging task_id and step_id to avoid unnecessary log entries with None values. This applies to all logging statements using task_id and step_id.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.

Workflow ID: wflow_Osn265XlhVrh8htF


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@LawyZheng
Copy link
Collaborator

why do we need this change? without step, we can't record any artifacts

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on dc83954 in 28 seconds

More details
  • Looked at 37 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern/forge/agent.py:1123
  • Draft comment:
    Consider making task and step optional parameters in _scrape_with_type to align with the PR's intent of making them optional in agent functions.
  • Reason this comment was not posted:
    Comment was not on a valid diff hunk.

Workflow ID: wflow_9XBZYMv3dOaxt7IB


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on face022 in 24 seconds

More details
  • Looked at 45 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern/forge/agent.py:1122
  • Draft comment:
    The task and step parameters are still mandatory in _scrape_with_type and _build_and_record_step_prompt. Consider making them optional if that aligns with the PR's intent.
  • Reason this comment was not posted:
    Comment was not on a valid diff hunk.

Workflow ID: wflow_4T8int4PjZEg5ZhV


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@wintonzheng wintonzheng merged commit 4103b75 into main Nov 25, 2024
2 checks passed
@wintonzheng wintonzheng deleted the shu/observer branch November 25, 2024 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants