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

infer action type from instruction #1231

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

LawyZheng
Copy link
Collaborator

@LawyZheng LawyZheng commented Nov 21, 2024

Important

Add action type inference from instructions using a new prompt template and update workflow service to handle parsing errors.

  • Behavior:
    • Introduces infer-action-type.j2 template to infer action types from instructions, outputting JSON with thought, confidence_float, action_type, and error.
    • Updates block_yaml_to_block() in service.py to use the new template for determining action types, raising FailedToParseActionInstruction on errors.
  • Exceptions:
    • Adds FailedToParseActionInstruction in exceptions.py for handling parsing failures with reason and error_type.
  • Models:
    • Removes action_type attribute from ActionBlockYAML in yaml.py.

This description was created by Ellipsis for 2e1d51d. 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 2e1d51d in 1 minute and 12 seconds

More details
  • Looked at 122 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. skyvern/forge/prompts/skyvern/infer-action-type.j2:7
  • Draft comment:
    Comments within JSON are not valid. Remove comments to ensure valid JSON output.
  • Reason this comment was not posted:
    Based on historical feedback, this comment is too similar to comments previously marked by users as bad.
2. skyvern/forge/sdk/workflow/service.py:1384
  • Draft comment:
    Ensure action_type is compared with the correct case. Convert ActionType enum values to lowercase for comparison or adjust action_type accordingly.
  • Reason this comment was not posted:
    Comment did not seem useful.

Workflow ID: wflow_CMtkxD8HH0SvU7YW


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

@LawyZheng LawyZheng merged commit bb6d3e6 into main Nov 21, 2024
2 checks passed
@LawyZheng LawyZheng deleted the lawy/infer-action-type-from-instruction branch November 21, 2024 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant