Skip to content

Commit 1fc1844

Browse files
committed
fix: configurable state file
1 parent 1d96acf commit 1fc1844

File tree

3 files changed

+44
-21
lines changed

3 files changed

+44
-21
lines changed

packages/uipath-llamaindex/pyproject.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "uipath-llamaindex"
3-
version = "0.3.0"
3+
version = "0.4.0"
44
description = "UiPath LlamaIndex SDK"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"
@@ -10,8 +10,8 @@ dependencies = [
1010
"llama-index-embeddings-azure-openai>=0.4.1",
1111
"llama-index-llms-azure-openai>=0.4.2",
1212
"openinference-instrumentation-llama-index>=4.3.9",
13-
"uipath>=2.4.0, <2.5.0",
14-
"uipath-runtime>=0.4.0, <0.5.0",
13+
"uipath>=2.5.0, <2.6.0",
14+
"uipath-runtime>=0.5.0, <0.6.0",
1515
]
1616
classifiers = [
1717
"Intended Audience :: Developers",
@@ -58,7 +58,9 @@ dev = [
5858
"pytest>=7.4.0",
5959
"pytest-cov>=4.1.0",
6060
"pytest-mock>=3.11.1",
61-
"pre-commit>=4.1.0",
61+
"pre-commit>=4.5.1",
62+
"filelock>=3.20.3",
63+
"virtualenv>=20.36.1",
6264
"pytest-asyncio>=1.0.0",
6365
"numpy>=1.24.0",
6466
]

packages/uipath-llamaindex/src/uipath_llamaindex/runtime/factory.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,16 @@ def _setup_instrumentation(self, trace_manager: UiPathTraceManager | None) -> No
6767

6868
def _get_storage_path(self) -> str:
6969
"""Get the storage path for workflow state."""
70+
if self.context.state_file_path is not None:
71+
return self.context.state_file_path
72+
7073
if self.context.runtime_dir and self.context.state_file:
7174
path = os.path.join(self.context.runtime_dir, self.context.state_file)
72-
if not self.context.resume and self.context.job_id is None:
75+
if (
76+
not self.context.resume
77+
and self.context.job_id is None
78+
and not self.context.keep_state_file
79+
):
7380
# If not resuming and no job id, delete the previous state file
7481
if os.path.exists(path):
7582
os.remove(path)

packages/uipath-llamaindex/uv.lock

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

0 commit comments

Comments
 (0)