HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/langchain_core/utils/loading.py
"""Utilities for loading configurations from langchain_core-hub."""

import warnings
from typing import Any

from langchain_core._api.deprecation import deprecated


@deprecated(
    since="0.1.30",
    removal="1.0",
    message=(
        "Using the hwchase17/langchain-hub "
        "repo for prompts is deprecated. Please use "
        "<https://smith.langchain.com/hub> instead."
    ),
)
def try_load_from_hub(
    *args: Any,
    **kwargs: Any,
) -> Any:
    warnings.warn(
        "Loading from the deprecated github-based Hub is no longer supported. "
        "Please use the new LangChain Hub at https://smith.langchain.com/hub instead.",
        DeprecationWarning,
        stacklevel=2,
    )
    # return None, which indicates that we shouldn't load from old hub
    # and might just be a filepath for e.g. load_chain
    return None