Skip to content

Commit 2e6e522

Browse files
authored
feat(agent): rename the generate-file tool type to create-file (#1923)
1 parent 4467f5d commit 2e6e522

4 files changed

Lines changed: 16 additions & 16 deletions

File tree

‎packages/uipath/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"
3-
version = "2.14.29"
3+
version = "2.14.30"
44
description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools."
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"

‎packages/uipath/src/uipath/agent/models/agent.py‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class AgentInternalToolType(str, CaseInsensitiveEnum):
128128
DEEP_RAG = "deep-rag"
129129
BATCH_TRANSFORM = "batch-transform"
130130
HTTP_REQUEST = "http-request"
131-
GENERATE_FILE = "generate-file"
131+
CREATE_FILE = "create-file"
132132

133133

134134
class AgentEscalationRecipientType(str, CaseInsensitiveEnum):
@@ -1067,11 +1067,11 @@ class AgentInternalHttpRequestToolProperties(BaseResourceProperties):
10671067
)
10681068

10691069

1070-
class AgentInternalGenerateFileToolProperties(BaseResourceProperties):
1071-
"""Agent internal generate file tool properties model."""
1070+
class AgentInternalCreateFileToolProperties(BaseResourceProperties):
1071+
"""Agent internal create file tool properties model."""
10721072

1073-
tool_type: Literal[AgentInternalToolType.GENERATE_FILE] = Field(
1074-
alias="toolType", default=AgentInternalToolType.GENERATE_FILE, frozen=True
1073+
tool_type: Literal[AgentInternalToolType.CREATE_FILE] = Field(
1074+
alias="toolType", default=AgentInternalToolType.CREATE_FILE, frozen=True
10751075
)
10761076

10771077

@@ -1081,7 +1081,7 @@ class AgentInternalGenerateFileToolProperties(BaseResourceProperties):
10811081
AgentInternalDeepRagToolProperties,
10821082
AgentInternalBatchTransformToolProperties,
10831083
AgentInternalHttpRequestToolProperties,
1084-
AgentInternalGenerateFileToolProperties,
1084+
AgentInternalCreateFileToolProperties,
10851085
],
10861086
Field(discriminator="tool_type"),
10871087
_case_insensitive_enum_validator("tool_type", AgentInternalToolType, "toolType"),

‎packages/uipath/tests/agent/models/test_agent.py‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
AgentGuardrailUnknownAction,
2828
AgentIntegrationToolResourceConfig,
2929
AgentInternalBatchTransformToolProperties,
30+
AgentInternalCreateFileToolProperties,
3031
AgentInternalDeepRagToolProperties,
31-
AgentInternalGenerateFileToolProperties,
3232
AgentInternalHttpRequestToolProperties,
3333
AgentInternalToolResourceConfig,
3434
AgentInternalToolType,
@@ -1758,10 +1758,10 @@ def test_agent_with_unknown_resource_type(self):
17581758
assert unknown_resource.name == "Future Resource"
17591759
assert unknown_resource.description == "A resource type that doesn't exist yet"
17601760

1761-
def test_agent_with_generate_file_tool(self):
1761+
def test_agent_with_create_file_tool(self):
17621762
json_data = {
1763-
"id": "test-generate-file",
1764-
"name": "Agent with Generate File",
1763+
"id": "test-create-file",
1764+
"name": "Agent with Create File",
17651765
"version": "1.0.0",
17661766
"settings": {
17671767
"model": "gpt-4o-2024-11-20",
@@ -1776,10 +1776,10 @@ def test_agent_with_generate_file_tool(self):
17761776
"$resourceType": "tool",
17771777
"type": "internal",
17781778
"referenceKey": None,
1779-
"name": "Generate File",
1779+
"name": "Create File",
17801780
"isEnabled": True,
17811781
"description": "Create a file and attach it to the job.",
1782-
"properties": {"toolType": "generate-file"},
1782+
"properties": {"toolType": "create-file"},
17831783
"inputSchema": {
17841784
"type": "object",
17851785
"properties": {"file_name": {"type": "string"}},
@@ -1801,9 +1801,9 @@ def test_agent_with_generate_file_tool(self):
18011801
tool_resource = config.resources[0]
18021802
assert isinstance(tool_resource, AgentInternalToolResourceConfig)
18031803
assert isinstance(
1804-
tool_resource.properties, AgentInternalGenerateFileToolProperties
1804+
tool_resource.properties, AgentInternalCreateFileToolProperties
18051805
)
1806-
assert tool_resource.properties.tool_type == AgentInternalToolType.GENERATE_FILE
1806+
assert tool_resource.properties.tool_type == AgentInternalToolType.CREATE_FILE
18071807

18081808
def test_agent_with_unknown_tool_type(self):
18091809
"""Test that AgentDefinition handles unknown tool types gracefully"""

‎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)