Skip to content

Commit 11f605e

Browse files
send exchange end
1 parent e81ed64 commit 11f605e

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/uipath/runtime/chat/protocol.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Abstract conversation bridge interface."""
22

3-
from typing import Protocol
3+
from typing import Protocol, Any
44

55
from uipath.core.chat import (
66
UiPathConversationMessageEvent,
@@ -48,6 +48,6 @@ async def emit_exchange_end_event(self) -> None:
4848
"""Send an exchange end event."""
4949
...
5050

51-
async def wait_for_resume(self) -> None:
51+
async def wait_for_resume(self) -> dict[str, Any]:
5252
"""Wait for the interrupt_end event to be received."""
5353
...

src/uipath/runtime/chat/runtime.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ async def stream(
103103
else:
104104
yield event
105105

106+
await self.chat_bridge.emit_exchange_end_event()
107+
106108
async def get_schema(self) -> UiPathRuntimeSchema:
107109
"""Get schema from the delegate runtime."""
108110
return await self.delegate.get_schema()

tests/test_chat_runtime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ async def stream(
146146
status=UiPathRuntimeStatus.SUSPENDED,
147147
trigger=UiPathResumeTrigger(
148148
trigger_type=UiPathResumeTriggerType.API,
149-
trigger_data={"action": "confirm_tool_call"},
149+
payload={"action": "confirm_tool_call"},
150150
),
151151
)
152152
return

0 commit comments

Comments
 (0)