patch_config#

langchain_core.runnables.config.patch_config(config: RunnableConfig | None, *, callbacks: BaseCallbackManager | None = None, recursion_limit: int | None = None, max_concurrency: int | None = None, run_name: str | None = None, configurable: dict[str, Any] | None = None) RunnableConfig[source]#

Patch a config with new values.

Parameters:
  • config (Optional[RunnableConfig]) – The config to patch.

  • callbacks (Optional[BaseCallbackManager], optional) – The callbacks to set. Defaults to None.

  • recursion_limit (Optional[int], optional) – The recursion limit to set. Defaults to None.

  • max_concurrency (Optional[int], optional) – The max concurrency to set. Defaults to None.

  • run_name (Optional[str], optional) – The run name to set. Defaults to None.

  • configurable (Optional[Dict[str, Any]], optional) – The configurable to set. Defaults to None.

Returns:

The patched config.

Return type:

RunnableConfig