Skip to content
Merged
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.10.8"
version = "2.10.9"
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
2 changes: 2 additions & 0 deletions packages/uipath/src/uipath/agent/utils/text_tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,6 @@ def serialize_argument(
return ""
if isinstance(value, (list, dict, bool)):
return json.dumps(value, ensure_ascii=False)
if hasattr(value, "value"):
return serialize_argument(value.value)
return str(value)
11 changes: 11 additions & 0 deletions packages/uipath/tests/agent/utils/test_text_tokens.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Tests for text_tokens.py utils."""

from enum import Enum

import pytest

from uipath.agent.models.agent import TextToken, TextTokenType
Expand Down Expand Up @@ -250,6 +252,11 @@ def test_null_intermediate_value(self):
class TestSerializeValue:
"""Test value serialization."""

class RiskTolerance(str, Enum):
"""Test enum mirroring dynamic string enums in input schemas."""

LOW = "low"

def test_string(self):
"""Test serializing strings."""
assert serialize_argument("hello") == "hello"
Expand Down Expand Up @@ -277,3 +284,7 @@ def test_boolean(self):
"""Test serializing booleans (JSON-style lowercase)."""
assert serialize_argument(True) == "true"
assert serialize_argument(False) == "false"

def test_string_enum_uses_underlying_value(self):
"""Test string enums serialize to their values for prompt interpolation."""
assert serialize_argument(self.RiskTolerance.LOW) == "low"
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