Skip to content
New issue

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

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

Already on GitHub? # to your account

add documentation of referencing parameters using jinja2 templating syntax #1614

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

wintonzheng
Copy link
Contributor

@wintonzheng wintonzheng commented Jan 22, 2025

Important

Adds documentation on referencing parameters using Jinja2 templating syntax in workflows.

  • Documentation:
    • Adds section "Referencing Parameters Using JINJA2 Templating Syntax" in what-is-a-parameter.mdx.
    • Explains using {{ parameter_key }} syntax to reference parameters in input fields.
    • Describes referencing block outputs using {{ block_label.output }} syntax with an example.

This description was created by Ellipsis for 9cf53eb. 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 804fbb2 in 12 seconds

More details
  • Looked at 21 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. docs/workflows/what-is-a-parameter.mdx:90
  • Draft comment:
    Consider using the correct capitalization for 'JINJA2'. It should be 'Jinja2'.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The documentation should consistently use the correct capitalization for terms like 'Jinja2'.

Workflow ID: wflow_e1gQfPu3pNsIjklv


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 9cf53eb in 11 seconds

More details
  • Looked at 15 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. docs/workflows/what-is-a-parameter.mdx:100
  • Draft comment:
    Add a newline at the end of the file for better formatting and adherence to best practices.
  • Reason this comment was not posted:
    Confidence changes required: 33%
    The new section added in the PR is clear and provides a useful example. However, it lacks a newline at the end of the file, which is a best practice for text files.

Workflow ID: wflow_8Ftn2vQpgkzCzqjQ


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

For example, if you have a parameter with the key `website_url`, you can reference it in a task block by using `{{ website_url }}` in the URL field.

### Referencing Block Output
A block can have output. To reference the output of a block, you can use the `{{ block_label.output }}` syntax.
Copy link
Collaborator

Choose a reason for hiding this comment

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

we haven't launched the format like {{ block_label.output }}. we only support {{ block_label_output }} today. Same issue for the screenshot.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

don't want users to use {{ block_label_output }} which we want to deprecate, so we can wait here

@LawyZheng
Copy link
Collaborator

can you add the doc for loop block too?

{{ label_in_loop_block.current_index }} and {{ label_in_loop_block.current_value }}

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants