run-llama / llama_index

LlamaIndex is a data framework for your LLM applications
https://docs.llamaindex.ai
MIT License
36.93k stars 5.29k forks source link

[Feature Request]: Revisit `StopEvent` emission to terminate workflows #15274

Open masci opened 3 months ago

masci commented 3 months ago

Feature Description

Find a better way to terminate a normal workflow execution.

Reason

Individual steps should remain mostly unaware of the wider workflow, while at the moment they can halt a run by emitting the special StopEvent. A higher-level function should determine the “done” condition, while steps can emit errors/abort signals for exceptional circumstances.

Value of Feature

A more robust event-driven architecture for workflows.

logan-markewich commented 3 months ago

I guess I'd also be wary of the complexity needed to implement a stop function.

What does it need access to? Context? List of events already emitted? List of steps already run? Not sure actually 🤔

dosubot[bot] commented 2 weeks ago

Hi, @masci. I'm Dosu, and I'm helping the LlamaIndex team manage their backlog. I'm marking this issue as stale.

Issue Summary:

Next Steps:

Thank you for your understanding and contribution!

masci commented 1 week ago

@dosubot keep it open