-
Notifications
You must be signed in to change notification settings - Fork 1
Updated Docs for Render Template #73
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.
Alread 8000 y on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -273,3 +273,12 @@ hide: | |||
* Currently we have to create it manually through the admin dashboard, but a near future release will include a dedicated page to view/edit participant data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The phrase 'but a near future release' should be revised for clarity.
* Currently we have to create it manually through the admin dashboard, but a near future release will include a dedicated page to view/edit participant data. | |
but a near-future release |
@@ -273,3 +273,12 @@ hide: | |||
* Currently we have to create it manually through the admin dashboard, but a near future release will include a dedicated page to view/edit participant data. | |||
* Please note that participant data is experiment specific, meaning that data we have for a participant in one | |||
experiment may not be the same for the next experiment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The phrase 'meaning that data we have for a participant in one experiment may not be the same for the next experiment' can be made more concise.
experiment may not be the same for the next experiment. | |
meaning that participant data may vary between experiments. |
|
||
## Mar 11, 2025 | ||
|
||
* **NEW** Updated Render Template node context |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The term 'RenderTemplate' should be consistently formatted, either as 'Render Template' or 'RenderTemplate'.
* **NEW** Updated Render Template node context | |
Render Template |
docs/changelog.md
Outdated
## Mar 11, 2025 | ||
|
||
* **NEW** Updated Render Template node context | ||
* The RenderTemplate node supports flexible input context handling by processing the messages field in the state. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The phrase 'by processing the messages field in the state' could be clearer.
* The RenderTemplate node supports flexible input context handling by processing the messages field in the state. | |
by processing the 'messages' field within the state. |
docs/changelog.md
Outdated
* This enhancement allows the node to dynamically update the context with data from dictionaries or strings. | ||
* If the input message is a dictionary, its key-value pairs are added to the context. | ||
* If the input message is a string, it updates the input field in the context. | ||
* This functionality ensures that the template node can access and render content dynamically based on participant details, pipeline temp state, and other input data without needing an additional Code Node for configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The phrase 'without needing an additional Code Node for configuration' could be simplified.
* This functionality ensures that the template node can access and render content dynamically based on participant details, pipeline temp state, and other input data without needing an additional Code Node for configuration. | |
without requiring an additional Code Node for configuration. |
docs/concepts/pipelines/nodes.md
Outdated
@@ -127,6 +127,29 @@ content = attachment.read_text() | |||
## Template | |||
Renders a [Jinja](https://jinja.palletsprojects.com/en/stable/templates/) template. | |||
|
|||
The RenderTemplate node ensures that the template node can access and render content dynamically based on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The phrase 'pipeline temp state' is unclear and could be more descriptive.
The RenderTemplate node ensures that the template node can access and render content dynamically based on | |
The RenderTemplate node ensures that the template node can access and render content dynamically based on participant details, pipeline temporary state, and other input data without needing an additional Code Node for configuration. |
"This is a custom welcome message." | ||
] | ||
} | ||
}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JSON format in 'Sample State' section is missing a closing brace.
}` | |
Add a closing brace to the JSON: } |
docs/concepts/pipelines/nodes.md
Outdated
### Sample Output | ||
`Hello Alice, | ||
Welcome to Wonderland! | ||
Message: This is a custom welcome message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'Sample Output' section should have a closing backtick for consistency.
Message: This is a custom welcome message. | |
Add a closing backtick: ` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vaibhavK1199 from here it looks like there are specific variables that users can use. Might be good to mention the list of available variables and what data they have.
Yep now i have added them. |
docs/changelog.md
Outdated
- `input`: The node’s input (string). | ||
- `temp_state`: Pipeline temporary state (dict). | ||
- `participant_details`: Participant details with `identifier` and `platform` keys (dict). | ||
- `participant_data`: Participant data for the session, sourced from `ParticipantDataProxy` (dict). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Participant data for the session
- To avoid confusing this with the session_state
, maybe just say something like
The participant's data
docs/concepts/pipelines/nodes.md
Outdated
| `input` | The input to the node | String | | ||
| `temp_state` | Pipeline temporary state | Dict | | ||
| `participant_details` | Participant details (`identifier`, `platform`) | Dict | | ||
| `participant_data` | Participant data for this session | Dict | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here. Remove the for this session
part
} | ||
`json | ||
{ | ||
"experiment_session": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this example an example of what a real context might look like?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this is just a simplified example for real Pipeline State object
Added Changelog for Updated Render Template Context - dimagi/open-chat-studio#1295