Skip to content

Commit d9eb847

Browse files
authored
Merge pull request #54 from UiPath/feat/middleware-response
feat: pass input and output file to runtime executor
2 parents 346c498 + 93e915c commit d9eb847

3 files changed

Lines changed: 12 additions & 9 deletions

File tree

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "uipath-llamaindex"
3-
version = "0.0.30"
3+
version = "0.0.31"
44
description = "UiPath LlamaIndex SDK"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.10"
@@ -9,7 +9,7 @@ dependencies = [
99
"llama-index-embeddings-azure-openai>=0.3.8",
1010
"llama-index-llms-azure-openai>=0.3.2",
1111
"openinference-instrumentation-llama-index>=4.3.0",
12-
"uipath>=2.0.79, <2.1.0",
12+
"uipath>=2.1.0, <2.2.0",
1313
]
1414
classifiers = [
1515
"Development Status :: 3 - Alpha",

src/uipath_llamaindex/_cli/cli_run.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
def llamaindex_run_middleware(
20-
entrypoint: Optional[str], input: Optional[str], resume: bool
20+
entrypoint: Optional[str], input: Optional[str], resume: bool, **kwargs
2121
) -> MiddlewareResult:
2222
"""Middleware to handle LlamaIndex agent execution"""
2323

@@ -37,6 +37,9 @@ async def execute():
3737
context.entrypoint = entrypoint
3838
context.input = input
3939
context.resume = resume
40+
context.debug = kwargs.get("debug", False)
41+
context.input_file = kwargs.get("input_file", None)
42+
context.execution_output_file = kwargs.get("execution_output_file", None)
4043
context.logs_min_level = env.get("LOG_LEVEL", "INFO")
4144
context.job_id = env.get("UIPATH_JOB_KEY")
4245
context.trace_id = env.get("UIPATH_TRACE_ID")
@@ -57,7 +60,7 @@ async def execute():
5760
env["UIPATH_REQUESTING_FEATURE"] = "llamaindex"
5861

5962
async with UiPathLlamaIndexRuntime.from_context(context) as runtime:
60-
return await runtime.execute()
63+
await runtime.execute()
6164

6265
asyncio.run(execute())
6366

uv.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)