langchain.schema.runnable.RouterRunnable¶
- class langchain.schema.runnable.RouterRunnable(runnables: Mapping[str, Runnable[Input, Output]])[source]¶
Bases:
Serializable,Generic[Input,Output],Runnable[RouterInput,Output]Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- param runnables: Mapping[str, langchain.schema.runnable.Runnable[langchain.schema.runnable.Input, langchain.schema.runnable.Output]] [Required]¶
- async abatch(inputs: List[RouterInput], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, max_concurrency: Optional[int] = None) List[Output][source]¶
- async ainvoke(input: RouterInput, config: Optional[RunnableConfig] = None) Output[source]¶
- async astream(input: RouterInput, config: Optional[RunnableConfig] = None) AsyncIterator[Output][source]¶
- batch(inputs: List[RouterInput], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, max_concurrency: Optional[int] = None) List[Output][source]¶
- invoke(input: RouterInput, config: Optional[RunnableConfig] = None) Output[source]¶
- stream(input: RouterInput, config: Optional[RunnableConfig] = None) Iterator[Output][source]¶
- to_json() Union[SerializedConstructor, SerializedNotImplemented]¶
- to_json_not_implemented() SerializedNotImplemented¶
- property lc_attributes: Dict¶
Return a list of attribute names that should be included in the serialized kwargs. These attributes must be accepted by the constructor.
- property lc_namespace: List[str]¶
Return the namespace of the langchain object. eg. [“langchain”, “llms”, “openai”]
- property lc_secrets: Dict[str, str]¶
Return a map of constructor argument names to secret ids. eg. {“openai_api_key”: “OPENAI_API_KEY”}
- property lc_serializable: bool¶
Return whether or not the class is serializable.