Toggle Menu
Prev Up Next

# `langchain_core.utils.env`.get_from_dict_or_env

langchain_core.utils.env.get_from_dict_or_env(data: Dict[str, Any], key: str, env_key: str, default: Optional[str] = None) → str

  Get a value from a dictionary or an environment variable.

  Parameters

    - data (Dict[str, Any]) –

    - key (str) –

    - env_key (str) –

    - default (Optional[str]) –

  Return type

    str