From f1bfd6051a7a3e840c3a9ddc437a2e7f14dd41c8 Mon Sep 17 00:00:00 2001 From: vbarda Date: Mon, 5 May 2025 21:02:10 -0400 Subject: [PATCH] update --- libs/langgraph/langgraph/pregel/remote.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libs/langgraph/langgraph/pregel/remote.py b/libs/langgraph/langgraph/pregel/remote.py index 72b2afc20..91a44912b 100644 --- a/libs/langgraph/langgraph/pregel/remote.py +++ b/libs/langgraph/langgraph/pregel/remote.py @@ -124,11 +124,14 @@ class RemoteGraph(PregelProtocol): sync_client: A `SyncLangGraphClient` instance to use instead of creating a default client. config: An optional `RunnableConfig` instance with additional configuration. name: Human-readable name to attach to the RemoteGraph instance. - Will be accessible via `RemoteGraph.name`. This is useful for adding `RemoteGraph` - as a subgraph via `graph.add_node(remote_graph)`. + This is useful for adding `RemoteGraph` as a subgraph via `graph.add_node(remote_graph)`. + If not provided, defaults to the assistant ID. """ self.assistant_id = assistant_id - self.name = name + if name is None: + self.name = assistant_id + else: + self.name = name self.config = config if client is None and url is not None: