Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/uipath/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "uipath"
version = "2.14.44"
version = "2.14.45"
description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools."
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.11"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def validate_prompt_placeholder(cls, v: str) -> str:
"""Validate that prompt contains required placeholders."""
if "{{ExpectedAgentBehavior}}" not in v or "{{AgentRunHistory}}" not in v:
raise ValueError(
"Prompt must contain {ExpectedAgentBehavior} and {{AgentRunHistory}} placeholders"
"Prompt must contain {{ExpectedAgentBehavior}} and {{AgentRunHistory}} placeholders"
)
return v

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import uuid

import pytest
from opentelemetry.sdk.trace import ReadableSpan
from pydantic import ValidationError

from uipath.eval.evaluators import LegacyTrajectoryEvaluator
from uipath.eval.evaluators.base_legacy_evaluator import LegacyEvaluationCriteria
Expand Down Expand Up @@ -62,3 +64,31 @@ def test_legacy_trajectory_prompt_uses_compact_tool_history() -> None:
assert '{"query": "mentor"}' in prompt
assert "found mentor profile" in prompt
assert "agent_llm_call" not in prompt


@pytest.mark.parametrize(
"prompt",
[
"History:\n{{AgentRunHistory}}\nExpected:\n{{ExpectedBehavior}}",
"Expected:\n{{ExpectedAgentBehavior}}",
],
)
def test_legacy_trajectory_prompt_error_names_double_brace_placeholders(
prompt: str,
) -> None:
with pytest.raises(ValidationError) as exc_info:
LegacyTrajectoryEvaluator(
id=str(uuid.uuid4()),
name="Legacy trajectory",
config_type=LegacyTrajectoryEvaluatorConfig,
evaluation_criteria_type=LegacyEvaluationCriteria,
justification_type=str,
category=LegacyEvaluatorCategory.Trajectory,
type=LegacyEvaluatorType.Trajectory,
prompt=prompt,
createdAt="2026-05-14T00:00:00Z",
updatedAt="2026-05-14T00:00:00Z",
)

message = str(exc_info.value)
assert "{{ExpectedAgentBehavior}} and {{AgentRunHistory}}" in message
2 changes: 1 addition & 1 deletion packages/uipath/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading