From ed412d89b4e5b746607cbe0a936bc5e11f0d3772 Mon Sep 17 00:00:00 2001 From: Eugene Yurtsev Date: Tue, 10 Sep 2024 15:49:51 -0400 Subject: [PATCH] core[patch]: Do not hard coded name for RunnableBranch (#26276) This is no longer necessary --- libs/core/langchain_core/runnables/branch.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/libs/core/langchain_core/runnables/branch.py b/libs/core/langchain_core/runnables/branch.py index 60b8382fcf4..47b5e8e45cd 100644 --- a/libs/core/langchain_core/runnables/branch.py +++ b/libs/core/langchain_core/runnables/branch.py @@ -138,13 +138,6 @@ class RunnableBranch(RunnableSerializable[Input, Output]): super().__init__( branches=_branches, default=default_, - # Hard-coding a name here because RunnableBranch is a generic - # and with pydantic 2, the class name with pydantic will capture - # include the parameterized type, which is not what we want. - # e.g., we'd get RunnableBranch[Input, Output] instead of RunnableBranch - # for the name. This information is already captured in the - # input and output types. - name="RunnableBranch", ) # type: ignore[call-arg] model_config = ConfigDict(