Skip to content
Open
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
1 change: 0 additions & 1 deletion .github/scripts/test_check_version_uniqueness.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import urllib.error
from unittest import mock

import pytest

from check_version_uniqueness import (
get_package_info,
Expand Down
2 changes: 1 addition & 1 deletion packages/uipath-core/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "uipath-core"
version = "0.5.11"
version = "0.5.12"
description = "UiPath Core abstractions"
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.11"
Expand Down
31 changes: 4 additions & 27 deletions packages/uipath-core/src/uipath/core/chat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,6 @@
UiPathConversationExchangeEvent,
UiPathConversationExchangeStartEvent,
)
from .interrupt import (
InterruptTypeEnum,
UiPathConversationGenericInterruptEndEvent,
UiPathConversationGenericInterruptStartEvent,
UiPathConversationInterrupt,
UiPathConversationInterruptData,
UiPathConversationInterruptEndEvent,
UiPathConversationInterruptEvent,
UiPathConversationInterruptStartEvent,
UiPathConversationToolCallConfirmationEndValue,
UiPathConversationToolCallConfirmationInterruptEndEvent,
UiPathConversationToolCallConfirmationInterruptStartEvent,
UiPathConversationToolCallConfirmationValue,
)
from .message import (
UiPathConversationMessage,
UiPathConversationMessageData,
Expand All @@ -108,6 +94,8 @@
)
from .tool import (
UiPathConversationToolCall,
UiPathConversationToolCallConfirmation,
UiPathConversationToolCallConfirmationEvent,
UiPathConversationToolCallData,
UiPathConversationToolCallEndEvent,
UiPathConversationToolCallEvent,
Expand Down Expand Up @@ -141,19 +129,6 @@
"UiPathConversationMessageEvent",
"UiPathConversationMessageData",
"UiPathConversationMessage",
# Interrupt
"InterruptTypeEnum",
"UiPathConversationInterruptStartEvent",
"UiPathConversationInterruptEndEvent",
"UiPathConversationInterruptEvent",
"UiPathConversationToolCallConfirmationValue",
"UiPathConversationToolCallConfirmationEndValue",
"UiPathConversationToolCallConfirmationInterruptStartEvent",
"UiPathConversationToolCallConfirmationInterruptEndEvent",
"UiPathConversationGenericInterruptStartEvent",
"UiPathConversationGenericInterruptEndEvent",
"UiPathConversationInterruptData",
"UiPathConversationInterrupt",
# Content
"UiPathConversationContentPartChunkEvent",
"UiPathConversationContentPartStartEvent",
Expand All @@ -178,6 +153,8 @@
# Tool
"UiPathConversationToolCallStartEvent",
"UiPathConversationToolCallEndEvent",
"UiPathConversationToolCallConfirmation",
"UiPathConversationToolCallConfirmationEvent",
"UiPathConversationToolCallEvent",
"UiPathConversationToolCallResult",
"UiPathConversationToolCallData",
Expand Down
112 changes: 0 additions & 112 deletions packages/uipath-core/src/uipath/core/chat/interrupt.py

This file was deleted.

8 changes: 0 additions & 8 deletions packages/uipath-core/src/uipath/core/chat/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@
UiPathConversationContentPartEvent,
)
from .error import UiPathConversationErrorEvent
from .interrupt import (
UiPathConversationInterrupt,
UiPathConversationInterruptData,
UiPathConversationInterruptEvent,
)
from .tool import (
UiPathConversationToolCall,
UiPathConversationToolCallData,
Expand Down Expand Up @@ -53,7 +48,6 @@ class UiPathConversationMessageEvent(BaseModel):
None, alias="contentPart"
)
tool_call: UiPathConversationToolCallEvent | None = Field(None, alias="toolCall")
interrupt: UiPathConversationInterruptEvent | None = None
meta_event: dict[str, Any] | None = Field(None, alias="metaEvent")
error: UiPathConversationErrorEvent | None = Field(None, alias="messageError")

Expand All @@ -68,7 +62,6 @@ class UiPathConversationMessageData(BaseModel):
..., alias="contentParts"
)
tool_calls: Sequence[UiPathConversationToolCallData] = Field(..., alias="toolCalls")
interrupts: Sequence[UiPathConversationInterruptData]

model_config = ConfigDict(validate_by_name=True, validate_by_alias=True)

Expand All @@ -86,6 +79,5 @@ class UiPathConversationMessage(UiPathConversationMessageData):
..., alias="contentParts"
)
tool_calls: Sequence[UiPathConversationToolCall] = Field(..., alias="toolCalls")
interrupts: Sequence[UiPathConversationInterrupt]

model_config = ConfigDict(validate_by_name=True, validate_by_alias=True)
27 changes: 27 additions & 0 deletions packages/uipath-core/src/uipath/core/chat/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class UiPathConversationToolCallStartEvent(BaseModel):
timestamp: str | None = None
input: dict[str, Any] | None = None
metadata: dict[str, Any] | None = Field(None, alias="metaData")
require_confirmation: bool | None = Field(None, alias="requireConfirmation")
input_schema: Any | None = Field(None, alias="inputSchema")

model_config = ConfigDict(validate_by_name=True, validate_by_alias=True)

Expand All @@ -41,6 +43,25 @@ class UiPathConversationToolCallEndEvent(BaseModel):
model_config = ConfigDict(validate_by_name=True, validate_by_alias=True)


class UiPathConversationToolCallConfirmationEvent(BaseModel):
"""Signals a tool call confirmation (approve/reject) from the client."""

approved: bool
input: Any | None = None

model_config = ConfigDict(validate_by_name=True, validate_by_alias=True)


class UiPathConversationToolCallConfirmation(BaseModel):
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verbose to have UiPathConversationToolCallConfirmationEvent and UiPathConversationToolCallConfirmation but follows convention we have for convo event schemas

"""Represents the stored confirmation state on a tool call."""

approved: bool
input: Any | None = None
confirmed_at: str | None = Field(None, alias="confirmedAt")

model_config = ConfigDict(validate_by_name=True, validate_by_alias=True)


class UiPathConversationToolCallEvent(BaseModel):
"""Encapsulates the data related to a tool call event."""

Expand All @@ -49,6 +70,9 @@ class UiPathConversationToolCallEvent(BaseModel):
None, alias="startToolCall"
)
end: UiPathConversationToolCallEndEvent | None = Field(None, alias="endToolCall")
confirm: UiPathConversationToolCallConfirmationEvent | None = Field(
None, alias="confirmToolCall"
)
meta_event: dict[str, Any] | None = Field(None, alias="metaEvent")
error: UiPathConversationErrorEvent | None = Field(None, alias="toolCallError")

Expand All @@ -61,6 +85,9 @@ class UiPathConversationToolCallData(BaseModel):
name: str
input: dict[str, Any] | None = None
result: UiPathConversationToolCallResult | None = None
require_confirmation: bool | None = Field(None, alias="requireConfirmation")
input_schema: Any | None = Field(None, alias="inputSchema")
confirmation: UiPathConversationToolCallConfirmation | None = None

model_config = ConfigDict(validate_by_name=True, validate_by_alias=True)

Expand Down
2 changes: 1 addition & 1 deletion packages/uipath-core/uv.lock

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

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ async def test_retrieve_message(
"role": "assistant",
"contentParts": [],
"toolCalls": [],
"interrupts": [],
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z",
},
Expand Down Expand Up @@ -95,7 +94,6 @@ async def test_retrieve_message_with_content_parts(
}
],
"toolCalls": [],
"interrupts": [],
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z",
},
Expand Down Expand Up @@ -145,7 +143,6 @@ async def test_retrieve_message_with_tool_calls(
"updatedAt": "2024-01-01T00:00:00Z",
}
],
"interrupts": [],
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z",
},
Expand Down
2 changes: 1 addition & 1 deletion packages/uipath-platform/uv.lock

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

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.48"
version = "2.10.49"
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
Loading
Loading