File tree Expand file tree Collapse file tree
src/uipath_llamaindex/_cli/_runtime Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22import logging
33from typing import Optional
44
5+ from llama_index .core .workflow import StartEvent
56from uipath import UiPath
67from uipath ._cli ._runtime ._contracts import (
78 UiPathBaseRuntime ,
@@ -39,7 +40,14 @@ async def execute(self) -> Optional[UiPathRuntimeResult]:
3940 await self .validate ()
4041
4142 try :
42- output = await self .context .workflow .run (self .context .input_json )
43+ ev = StartEvent (** self .context .input_json )
44+
45+ handler = self .context .workflow .run (start_event = ev )
46+
47+ async for event in handler .stream_events ():
48+ print (event )
49+
50+ output = await handler
4351
4452 self .context .result = UiPathRuntimeResult (
4553 output = self ._serialize_object (output )
@@ -171,4 +179,4 @@ def _serialize_object(self, obj):
171179 return obj
172180 # Return primitive types as is
173181 else :
174- return obj
182+ return { "result" : obj }
You can’t perform that action at this time.
0 commit comments