Toggle Menu
Prev Up Next

# `langchain_core.load.load`.load

langchain_core.load.load.load(obj: Any, *, secrets_map: Optional[Dict[str, str]] = None, valid_namespaces: Optional[List[str]] = None, secrets_from_env: bool = True) → Any

  [Beta] Revive a LangChain class from a JSON object. Use this if you already have a parsed JSON object, eg. from json.load or orjson.loads.

  Parameters

    - obj (Any) – The object to load.

    - secrets_map (Optional[Dict[str, str]]) – A map of secrets to load.

    - valid_namespaces (Optional[List[str]]) – A list of additional namespaces (modules) to allow to be deserialized.

    - secrets_from_env (bool) –

  Returns

    Revived LangChain objects.

  Return type

    Any

  Notes