Skip to content

Commit ab8b772

Browse files
feat(platform): add guardrailName to guardrails validation payload (#1746)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3d0cfdc commit ab8b772

6 files changed

Lines changed: 9 additions & 5 deletions

File tree

packages/uipath-platform/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "uipath-platform"
3-
version = "0.1.75"
3+
version = "0.1.76"
44
description = "HTTP client library for programmatic access to UiPath Platform"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"

packages/uipath-platform/src/uipath/platform/guardrails/_guardrails_service.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ def evaluate_guardrail(
116116
"validator": guardrail.validator_type,
117117
"input": input_data if isinstance(input_data, str) else str(input_data),
118118
"parameters": parameters,
119+
"guardrailName": guardrail.name,
119120
}
120121
spec = RequestSpec(
121122
method="POST",

packages/uipath-platform/tests/services/test_guardrails_service.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,15 +262,18 @@ def capture_request(request):
262262
# Parse the request payload
263263
request_payload = json.loads(captured_request.content)
264264

265-
# Verify the payload structure matches the reverted format:
265+
# Verify the payload structure:
266266
# {
267267
# "validator": guardrail.validator_type,
268268
# "input": input_data,
269269
# "parameters": parameters,
270+
# "guardrailName": guardrail.name,
270271
# }
271272
assert "validator" in request_payload
272273
assert "input" in request_payload
273274
assert "parameters" in request_payload
275+
assert "guardrailName" in request_payload
276+
assert request_payload["guardrailName"] == "PII detection guardrail"
274277

275278
# Verify validator is a string (not an object)
276279
assert isinstance(request_payload["validator"], str)

packages/uipath-platform/uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/uipath/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ requires-python = ">=3.11"
77
dependencies = [
88
"uipath-core>=0.5.21, <0.6.0",
99
"uipath-runtime>=0.11.0, <0.12.0",
10-
"uipath-platform>=0.1.75, <0.2.0",
10+
"uipath-platform>=0.1.76, <0.2.0",
1111
"click>=8.3.1",
1212
"httpx>=0.28.1",
1313
"pyjwt>=2.10.1",

packages/uipath/uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)