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

feat(agents-api): Add static checking for Jinja templates & Python expressions in task creation | Add validation for subworkflows #570

Merged
merged 5 commits into from
Oct 2, 2024

Conversation

HamadaSalhab
Copy link
Contributor

@HamadaSalhab HamadaSalhab commented Oct 2, 2024

Closes #535

Important

Add static validation for Python expressions and Jinja templates in task creation and validate subworkflows in openapi_model.py and steps.tsp.

  • Validation:
    • Add validate_python_expression() and validate_jinja_template() in openapi_model.py.
    • Integrate validation into EvaluateStep, ToolCallStep, PromptStep, SetStep, LogStep, ReturnStep, YieldStep, IfElseWorkflowStep, and MapReduceStep in openapi_model.py.
  • Models:
    • Update CreateTaskRequest in openapi_model.py to validate subworkflows using WorkflowType.
    • Add YieldStep to MappableWorkflowStep and NonConditionalWorkflowStep in steps.tsp.
  • Misc:
    • Reorder YieldStep in Tasks.py to maintain consistency.

This description was created by Ellipsis for 9952ad5. 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 6fa8605 in 16 seconds

More details
  • Looked at 437 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. typespec/tasks/steps.tsp:53
  • Draft comment:
    YieldStep is duplicated in the NonConditionalWorkflowStep alias. Please remove the redundant entry.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_X3vnUqkhQc71S9ng


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

@HamadaSalhab HamadaSalhab changed the title feat(agents-api): Add static checking for Jinja templates & Python expressions in task creation feat(agents-api): Add static checking for Jinja templates & Python expressions in task creation | Add validation for subworkflows Oct 2, 2024
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 9952ad5 in 10 seconds

More details
  • Looked at 15 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_vjN86ojxZSZlOQaf


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

@creatorrr creatorrr merged commit 46ed8fa into dev Oct 2, 2024
3 checks passed
@creatorrr creatorrr deleted the f/task-creation-validation-improvement branch October 2, 2024 21:47
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.

feat: Static checks of python expressions inside workflows
2 participants