You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having the ability to access the result of intermediary results, for example in a sequential chain having the ability to access {{text}}.
let chain:Chain = Chain::new(vec![// First step: make a personalized birthday emailStep::for_prompt_template(
prompt!("You are a bot for making personalized greetings", "Make personalized birthday e-mail to the whole company for {{name}} who has their birthday on {{date}}. Include their name")),
// Second step: summarize the email into a tweet. Importantly, the text parameter becomes the result of the previous prompt.Step::for_prompt_template(
prompt!("You are an assistant for managing social media accounts for a company", "Summarize this email into a tweet to be sent by the company, use emoji if you can. \n--\n{{text}}"))]);
Maybe its possible and I am missing something, feel free to close if that's the case.
The text was updated successfully, but these errors were encountered:
Maybe we can add hooks to a Step so that the user can react to the input and output for theStep. I am thinking about adding the before and after hooks. In the before hook the user can get the input and in the after hook the user can get the output from the Step. The executor will run those hooks on execution. This will make Chain more flexible & observable & easy to debug. It also makes it possible to modify the intermediate values based on their needs.
Maybe we can add hooks to a Step so that the user can react to the input and output for theStep. I am thinking about adding the before and after hooks. In the before hook the user can get the input and in the after hook the user can get the output from the Step. The executor will run those hooks on execution. This will make Chain more flexible & observable & easy to debug. It also makes it possible to modify the intermediate values based on their needs.
If we agree on this, I can start working on it.
Sounds like a great plan. Hooks is a great way to solve it. Being able to observe and use step_n is very helpful as it prevents having to run a completely different step to get that result, costing more.
Having the ability to access the result of intermediary results, for example in a sequential chain having the ability to access
{{text}}
.Maybe its possible and I am missing something, feel free to close if that's the case.
The text was updated successfully, but these errors were encountered: