Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/human_in_the_loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ from uipath_llamaindex.models import InvokeProcessEvent
ctx.write_event_to_stream(InvokeProcessEvent(name="MyProcess", process_folder_path="MyFolderPath", input_arguments={"arg1": "value1"}))
job_data = await ctx.wait_for_event(HumanResponseEvent)
```
/// info
The return value of the event is the job output. If the job did not produce any output, the return value will be the job state, e.g., `{"state": "successful"}`.
///

/// warning
An agent can invoke itself if needed, but this must be done with caution. Be mindful that using the same name for invocation may lead to unintentional loops. To prevent recursion issues, implement safeguards like exit conditions.
Expand All @@ -100,3 +103,6 @@ from uipath_llamaindex.models import WaitJobEvent
ctx.write_event_to_stream(WaitJobEvent(job=my_job_instance, process_folder_path="MyFolderPath"))
job_data = await ctx.wait_for_event(HumanResponseEvent)
```
/// info
The return value of the event is the job output. If the job did not produce any output, the return value will be the job state, e.g., `{"state": "successful"}`.
///
8 changes: 7 additions & 1 deletion src/uipath_llamaindex/models/events.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from uipath.platform.common import CreateTask, InvokeProcess, WaitJob, WaitTask
from uipath.platform.common import CreateTask, InvokeProcess, WaitJob, WaitTask, WaitEscalation, CreateEscalation
from workflows.events import InputRequiredEvent


Expand All @@ -16,3 +16,9 @@ class CreateTaskEvent(CreateTask, InputRequiredEvent):

class WaitTaskEvent(WaitTask, InputRequiredEvent):
pass

class WaitEscalationEvent(WaitEscalation, InputRequiredEvent):
pass

class CreateEscalationEvent(CreateEscalation, InputRequiredEvent):
pass
Loading