litaojin
litaojin
Would it be better to use a callback mechanism to handle stream trunk output from an intermediate node in a workflow? I have extended StreamNode and StreamFlow as examples, using...
Firstly, I would appreciate this wonderful framework really helped on my current work. The current code is just the result of a few hours after I saw this framework, so...
You're right, my current use case is only for obtaining LLM stream output, and it's only on this one LLM Node. How to elegantly implement this under the framework indeed...
@zachary62 I had another idea to support stream. Most of use cases for stream out looks like: ``` for trunk in flow.run_stream(start_node): ... ``` run_stream should work as a generator...
One typical example I can think of is Multi-step Agents, where "LLM output controls iteration and program continuation" - which is actually the use case in my current project. For...
Yes, it is a Multi-step Agent. The pseudo code looks like below: ``` Class StreamNode(BaseNode): def exec_stream(self, prep_res) -> Generator: yield None Class StreamFlow(Flow): def run_stream(): yield from self._orch_stream() def...