langchain.schema.runnable.RunnableMap¶
- class langchain.schema.runnable.RunnableMap(steps: Mapping[str, Union[Runnable[Input, Any], Callable[[Input], Any], Mapping[str, Union[Runnable[Input, Any], Callable[[Input], Any]]]]])[source]¶
Bases:
Serializable,Runnable[Input,Dict[str,Any]]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 steps: Mapping[str, langchain.schema.runnable.Runnable[langchain.schema.runnable.Input, Any]] [Required]¶
- async ainvoke(input: Input, config: Optional[RunnableConfig] = None) Dict[str, Any][source]¶
- invoke(input: Input, config: Optional[RunnableConfig] = None) Dict[str, Any][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.