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: step hooks #197

Closed
wants to merge 5 commits into from
Closed

feat: step hooks #197

wants to merge 5 commits into from

Conversation

ppppqp
Copy link

@ppppqp ppppqp commented Jul 28, 2023

Hi guys, I have add a simple feature of customizable hooks for Step to make it more flexible and observable. More context can be found here.

Key changes summary:

  • Modified the struct and constructor of Step, adding two members.
  • Modified the format_and_execute function of Frame to execute the hooks.
  • Add tests for this new feature in crates/llm-chain/tests/test_step_hooks.rs.

I am pretty new to rust so any comments and suggestions are welcomed.

@Juzov
Copy link
Collaborator

Juzov commented Jul 29, 2023

Hi, thanks for the pr!

Checked a bit briefly. I think this feature needs an example to understand how to use it for issue.

To be able to interact with outputs, which need to be awaited, you'd need your hook functions to be async.

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.

3 participants