langchain_prompty.core.param_hoisting¶

langchain_prompty.core.param_hoisting(top: Dict[str, Any], bottom: Dict[str, Any], top_key: Optional[Any] = None) Dict[str, Any][source]¶

Merge two dictionaries with hoisting of parameters from bottom to top.

Parameters
  • top (Dict[str, Any]) – The top dictionary.

  • bottom (Dict[str, Any]) – The bottom dictionary.

  • top_key (Optional[Any]) – The key to hoist from the bottom to the top.

Returns

The merged dictionary.

Return type

Dict[str, Any]