Skip to content

Commit 115bcfd

Browse files
committed
fix: circular import
1 parent d43a786 commit 115bcfd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/uipath_langchain/chat/hitl.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
UiPathConversationToolCallConfirmationValue,
1313
)
1414

15-
from uipath_langchain.agent.tools.durable_interrupt import add_interrupt_offset
16-
1715
CANCELLED_MESSAGE = "Cancelled by user"
1816

1917
CONVERSATIONAL_APPROVED_TOOL_ARGS = "conversational_approved_tool_args"
@@ -129,6 +127,10 @@ def request_approval(
129127
input_value=tool_args,
130128
)
131129
)
130+
# Lazy import to avoid circular dependency:
131+
# hitl -> agent.tools.durable_interrupt -> agent.tools -> tool_node -> hitl
132+
from uipath_langchain.agent.tools.durable_interrupt import add_interrupt_offset
133+
132134
# Workaround for langgraph#6792 — remove when subgraph @task + interrupt()
133135
# checkpoint caching is fixed upstream
134136
add_interrupt_offset()

0 commit comments

Comments
 (0)