-
Notifications
You must be signed in to change notification settings - Fork 5.9k
docs: recipe updates #3844
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
docs: recipe updates #3844
Changes from 1 commit
409f5a6
c96b793
8db6c5d
9c59da5
64d4c19
3e2ceea
0986e3f
b78ef00
97dbb70
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,15 +26,15 @@ Sub-recipe sessions run in isolation - they don't share conversation history, me | |
|
|
||
| ### Parameter Handling | ||
|
|
||
| Sub-recipes receive parameters in two ways: | ||
| Parameters received by sub-recipes can be used in prompts and instructions using `{{ parameter_name }}` syntax. Sub-recipes receive parameters in two ways: | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for sub-recipes, they can run by itself. There is another usage, the parameter value can be passed via session context so that the user does not have to specify. I am sorry if I have confused you. I'll create some example recipe and share with you.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🙏 Replaced "automatic inheritance" with "context-based parameters" |
||
|
|
||
| 1. **Pre-set values**: Fixed parameter values defined in the `values` field are automatically provided and cannot be overridden at runtime | ||
| 2. **Automatic parameter inheritance**: Sub-recipes automatically have access to all parameters passed to the main recipe at runtime. | ||
|
|
||
| Pre-set values take precedence over inherited parameters. If both the main recipe and `values` field provide the same parameter, the `values` version is used. | ||
|
|
||
| :::info Template Variables | ||
| Parameters received by sub-recipes can be used in prompts and instructions using `{{ parameter_name }}` syntax. | ||
| :::tip | ||
| Use the `indent()` filter to maintain valid YAML format when passing multi-line parameter values to sub-recipes, for example: `{{ content | indent(2) }}`. See [Template Support](/docs/guides/recipes/recipe-reference#template-support) for more details. | ||
| ::: | ||
|
|
||
| ## Examples | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
Nice! thanks for adding this in!
{{ raw_data | indent(2) }} mabye have more indent to align with the content