Skip to content

Commit 5cd07c8

Browse files
yashwagle1claude
andauthored
Feat/modify pii masking endpoint (#891)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent ada41c9 commit 5cd07c8

4 files changed

Lines changed: 15 additions & 15 deletions

File tree

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[project]
22
name = "uipath-langchain"
3-
version = "0.11.12"
3+
version = "0.11.13"
44
description = "Python SDK that enables developers to build and deploy LangGraph agents to the UiPath Cloud Platform"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"
77
dependencies = [
88
"uipath>=2.10.74, <2.11.0",
99
"uipath-core>=0.5.17, <0.6.0",
10-
"uipath-platform>=0.1.59, <0.2.0",
10+
"uipath-platform>=0.1.61, <0.2.0",
1111
"uipath-runtime>=0.11.0, <0.12.0",
1212
"langgraph>=1.1.8, <2.0.0",
1313
"langchain-core>=1.2.11, <2.0.0",

src/uipath_langchain/agent/tools/internal_tools/pii_masker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
from uipath.core.feature_flags import FeatureFlags
1212
from uipath.platform import UiPath
13-
from uipath.platform.semantic_proxy import (
13+
from uipath.platform.pii_detection import (
1414
PiiDetectionRequest,
1515
PiiDetectionResponse,
1616
PiiDocument,
@@ -94,7 +94,7 @@ async def apply(
9494
],
9595
entity_thresholds=self._entity_thresholds_from_policy() or None,
9696
)
97-
self._result = await self._client.semantic_proxy.detect_pii_async(request)
97+
self._result = await self._client.pii_detection.detect_pii_async(request)
9898
logger.info(
9999
"PII detection completed: %d document entities, %d file entities",
100100
sum(len(d.pii_entities) for d in self._result.response),

tests/agent/tools/internal_tools/test_pii_masker.py

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

66
import pytest
77
from uipath.core.feature_flags import FeatureFlags
8-
from uipath.platform.semantic_proxy import (
8+
from uipath.platform.pii_detection import (
99
PiiDetectionResponse,
1010
PiiDocumentResult,
1111
PiiEntity,
@@ -53,8 +53,8 @@ def _make_client(
5353
upload_result: uuid.UUID | None = None,
5454
) -> Mock:
5555
client = Mock()
56-
client.semantic_proxy = Mock()
57-
client.semantic_proxy.detect_pii_async = AsyncMock(return_value=response)
56+
client.pii_detection = Mock()
57+
client.pii_detection.detect_pii_async = AsyncMock(return_value=response)
5858
client.jobs = Mock()
5959
client.jobs.create_attachment_async = AsyncMock(
6060
return_value=upload_result or uuid.uuid4()
@@ -241,7 +241,7 @@ async def test_masks_prompt_and_annotates_files(self, httpx_mock):
241241
assert masked_files[0].masked_attachment_id == str(uploaded_uuid)
242242
assert masked_files[0].attachment_id == "orig-uuid"
243243

244-
request = client.semantic_proxy.detect_pii_async.call_args[0][0]
244+
request = client.pii_detection.detect_pii_async.call_args[0][0]
245245
assert request.files[0].file_name == "doc.pdf"
246246
assert request.files[0].file_type == "pdf"
247247

@@ -315,7 +315,7 @@ async def test_passes_entity_thresholds_from_policy(self):
315315

316316
await PiiMasker(client, policy).apply("original", [])
317317

318-
request = client.semantic_proxy.detect_pii_async.call_args[0][0]
318+
request = client.pii_detection.detect_pii_async.call_args[0][0]
319319
assert request.entity_thresholds == [
320320
PiiEntityThreshold(category="Email", confidence_threshold=0.6)
321321
]

uv.lock

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

0 commit comments

Comments
 (0)