sobelio / llm-chain

`llm-chain` is a powerful rust crate for building chains in large language models allowing you to summarise text and complete complex tasks
https://llm-chain.xyz
MIT License
1.3k stars 128 forks source link

feat: step hooks #197

Closed ppppqp closed 7 months ago

ppppqp commented 1 year ago

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:

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

Juzov commented 1 year ago

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.