From 93e915c02d2eb4d2be381b7aba20d111526e4194 Mon Sep 17 00:00:00 2001 From: radu-mocanu Date: Wed, 23 Jul 2025 14:40:50 +0300 Subject: [PATCH] feat: pass input and output file to runtime executor --- pyproject.toml | 4 ++-- src/uipath_llamaindex/_cli/cli_run.py | 7 +++++-- uv.lock | 10 +++++----- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6c33ab58..ef251207 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "uipath-llamaindex" -version = "0.0.30" +version = "0.0.31" description = "UiPath LlamaIndex SDK" readme = { file = "README.md", content-type = "text/markdown" } requires-python = ">=3.10" @@ -9,7 +9,7 @@ dependencies = [ "llama-index-embeddings-azure-openai>=0.3.8", "llama-index-llms-azure-openai>=0.3.2", "openinference-instrumentation-llama-index>=4.3.0", - "uipath>=2.0.79, <2.1.0", + "uipath>=2.1.0, <2.2.0", ] classifiers = [ "Development Status :: 3 - Alpha", diff --git a/src/uipath_llamaindex/_cli/cli_run.py b/src/uipath_llamaindex/_cli/cli_run.py index a17b95fc..c1315a73 100644 --- a/src/uipath_llamaindex/_cli/cli_run.py +++ b/src/uipath_llamaindex/_cli/cli_run.py @@ -17,7 +17,7 @@ def llamaindex_run_middleware( - entrypoint: Optional[str], input: Optional[str], resume: bool + entrypoint: Optional[str], input: Optional[str], resume: bool, **kwargs ) -> MiddlewareResult: """Middleware to handle LlamaIndex agent execution""" @@ -37,6 +37,9 @@ async def execute(): context.entrypoint = entrypoint context.input = input context.resume = resume + context.debug = kwargs.get("debug", False) + context.input_file = kwargs.get("input_file", None) + context.execution_output_file = kwargs.get("execution_output_file", None) context.logs_min_level = env.get("LOG_LEVEL", "INFO") context.job_id = env.get("UIPATH_JOB_KEY") context.trace_id = env.get("UIPATH_TRACE_ID") @@ -57,7 +60,7 @@ async def execute(): env["UIPATH_REQUESTING_FEATURE"] = "llamaindex" async with UiPathLlamaIndexRuntime.from_context(context) as runtime: - return await runtime.execute() + await runtime.execute() asyncio.run(execute()) diff --git a/uv.lock b/uv.lock index 80f065ee..7dc605ef 100644 --- a/uv.lock +++ b/uv.lock @@ -3039,7 +3039,7 @@ wheels = [ [[package]] name = "uipath" -version = "2.0.77" +version = "2.1.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "azure-monitor-opentelemetry" }, @@ -3054,14 +3054,14 @@ dependencies = [ { name = "tomli" }, { name = "truststore" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/04/7b/f0ed6b0778b19b86e8fd2c0c1f3230a4d3f7963e9a27afd3d2c47a086f30/uipath-2.0.77.tar.gz", hash = "sha256:c52132d85a590fe5e47814cdce28f393b7e8894a90ae60fc05deec614f2bb43f", size = 1852541 } +sdist = { url = "https://files.pythonhosted.org/packages/fc/93/c0b0f4a25331943f880c38029b99c6d8bbdf1a683f45ee9256008b164997/uipath-2.1.0.tar.gz", hash = "sha256:862999fa4eb7599a2cfb4dfa98741238ead89b450bb8ffcb1552af4c4270808d", size = 1902998 } wheels = [ - { url = "https://files.pythonhosted.org/packages/f4/4f/07b00996e04b00b0987867b07d704bc32cdc7cdf5f26ea3ede35f29cd3de/uipath-2.0.77-py3-none-any.whl", hash = "sha256:4c6bc3d8cff6d0739ac8f09d5ad6f15b3cfe94abd1a617c71a4ed4cf4abff9a2", size = 133782 }, + { url = "https://files.pythonhosted.org/packages/c0/ff/a2fda98101d338727f17a517e143fb3b4ab99b41aaf067dd0940946b819d/uipath-2.1.0-py3-none-any.whl", hash = "sha256:16a02172676bf78b30bce8c20abcbcb2d282a0aa5fefffb6939319ccbff366f5", size = 136628 }, ] [[package]] name = "uipath-llamaindex" -version = "0.0.29" +version = "0.0.31" source = { editable = "." } dependencies = [ { name = "llama-index" }, @@ -3089,7 +3089,7 @@ requires-dist = [ { name = "llama-index-embeddings-azure-openai", specifier = ">=0.3.8" }, { name = "llama-index-llms-azure-openai", specifier = ">=0.3.2" }, { name = "openinference-instrumentation-llama-index", specifier = ">=4.3.0" }, - { name = "uipath", specifier = ">=2.0.75,<2.1.0" }, + { name = "uipath", specifier = ">=2.1.0,<2.2.0" }, ] [package.metadata.requires-dev]