Skip to content

Commit d7c1556

Browse files
committed
Added t.__enter__ which breaks sandbox
1 parent 89c2f4d commit d7c1556

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

langchain/langchain_interceptor.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
with workflow.unsafe.imports_passed_through():
66
from contextlib import contextmanager
77
from typing import Any, Mapping, Protocol, Type
8-
9-
108
from langsmith import trace, tracing_context
119
from langsmith.run_helpers import get_current_run_tree
1210

@@ -145,6 +143,7 @@ def start_activity(
145143
) -> workflow.ActivityHandle:
146144
with workflow.unsafe.sandbox_unrestricted():
147145
t = trace(name=f"start_activity:{input.activity}", run_id=workflow.uuid4())
146+
t.__enter__()
148147
try:
149148
set_header_from_context(input, workflow.payload_converter())
150149
return self.next.start_activity(input)

0 commit comments

Comments
 (0)