Skyvern-AI / skyvern

Automate browser-based workflows with LLMs and Computer Vision
https://www.skyvern.com
GNU Affero General Public License v3.0
10.57k stars 725 forks source link

add new workflow block #1228

Closed LawyZheng closed 1 day ago

LawyZheng commented 1 day ago

[!IMPORTANT] This PR adds new workflow blocks ValidationBlock and ActionBlock, updates the database schema for task criteria and prompt templates, and introduces new prompt templates for task actions.

  • Database Schema:
    • Adds columns prompt_template, complete_criterion, and terminate_criterion to tasks table in 2024_11_21_0708-2d79d5fc1baa_add_task_prompt_template_complete_.py.
  • Workflow Blocks:
    • Introduces ValidationBlock and ActionBlock in block.py with specific execution logic.
    • Updates block_yaml_to_block() in service.py to handle new block types.
  • Prompt Templates:
    • Adds new templates decisive-criterion-validate.j2, single-click-action.j2, single-input-action.j2, single-select-action.j2, and single-upload-action.j2 for different task actions.
  • Enums and Models:
    • Adds TaskPromptTemplate and ActionType enums in enums.py.
    • Updates TaskModel in models.py to include new fields for task criteria and prompt templates.
  • Misc:
    • Modifies create_task() in client.py to include new task fields.
    • Updates convert_to_task() in utils.py to handle new task attributes.

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