mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-13 13:36:15 +00:00
pipe default key (#11788)
This commit is contained in:
@@ -992,6 +992,7 @@ class RunnableSerializable(Serializable, Runnable[Input, Output]):
|
||||
def configurable_alternatives(
|
||||
self,
|
||||
which: ConfigurableField,
|
||||
default_key: str = "default",
|
||||
**kwargs: Runnable[Input, Output],
|
||||
) -> RunnableSerializable[Input, Output]:
|
||||
from langchain.schema.runnable.configurable import (
|
||||
@@ -999,7 +1000,7 @@ class RunnableSerializable(Serializable, Runnable[Input, Output]):
|
||||
)
|
||||
|
||||
return RunnableConfigurableAlternatives(
|
||||
which=which, default=self, alternatives=kwargs
|
||||
which=which, default=self, alternatives=kwargs, default_key=default_key
|
||||
)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user