mirror of
https://github.com/run-llama/llama_deploy.git
synced 2026-07-01 21:04:00 -04:00
671295d518
* depend on workflows explicitly * temp * backup * revert * backup * fix test * e2e * remove cp and mq * remove sleeps * fix unit tests * fix ui server
18 lines
447 B
Python
18 lines
447 B
Python
from workflows import Workflow, step
|
|
from workflows.events import (
|
|
HumanResponseEvent,
|
|
InputRequiredEvent,
|
|
StartEvent,
|
|
StopEvent,
|
|
)
|
|
|
|
|
|
class HumanInTheLoopWorkflow(Workflow):
|
|
@step
|
|
async def step1(self, ev: StartEvent) -> InputRequiredEvent:
|
|
return InputRequiredEvent(prefix="Enter a number: ")
|
|
|
|
@step
|
|
async def step2(self, ev: HumanResponseEvent) -> StopEvent:
|
|
return StopEvent(result=ev.response)
|