From ac1407b23c50a899db4a7de78d5192b43c36febd Mon Sep 17 00:00:00 2001 From: Nuno Campos Date: Wed, 22 Jan 2025 09:44:52 -0800 Subject: [PATCH] Remove write to RETURN channel for entrypoint func --- libs/langgraph/langgraph/pregel/call.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/libs/langgraph/langgraph/pregel/call.py b/libs/langgraph/langgraph/pregel/call.py index 9a74eb0c3..063df89a8 100644 --- a/libs/langgraph/langgraph/pregel/call.py +++ b/libs/langgraph/langgraph/pregel/call.py @@ -158,14 +158,9 @@ def get_runnable_for_entrypoint(func: Callable[..., Any]) -> RunnableSeq: trace=False, recurse=False, ) - seq = RunnableSeq( - run, - ChannelWrite([ChannelWriteEntry(RETURN)], tags=[TAG_HIDDEN]), - name=func.__name__, - ) if not _lookup_module_and_qualname(func): - return seq - return CACHE.setdefault(key, seq) + return run + return CACHE.setdefault(key, run) def get_runnable_for_task(func: Callable[..., Any]) -> RunnableSeq: