Home / Function/ warn_beta() — langchain Function Reference

warn_beta() — langchain Function Reference

Architecture documentation for the warn_beta() function in beta_decorator.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  5b954159_166b_1d8d_a550_0870b51fa2dd["warn_beta()"]
  99630651_1456_c882_1b50_48e292b442ff["beta_decorator.py"]
  5b954159_166b_1d8d_a550_0870b51fa2dd -->|defined in| 99630651_1456_c882_1b50_48e292b442ff
  a46773f8_4c3d_a279_43db_daf6a5b4e0a6["beta()"]
  a46773f8_4c3d_a279_43db_daf6a5b4e0a6 -->|calls| 5b954159_166b_1d8d_a550_0870b51fa2dd
  style 5b954159_166b_1d8d_a550_0870b51fa2dd fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/_api/beta_decorator.py lines 213–245

def warn_beta(
    *,
    message: str = "",
    name: str = "",
    obj_type: str = "",
    addendum: str = "",
) -> None:
    """Display a standardized beta annotation.

    Args:
        message: Override the default beta message.

            The %(name)s, %(obj_type)s, %(addendum)s format specifiers will be replaced
            by the values of the respective arguments passed to this function.
        name: The name of the annotated object.
        obj_type: The object type being annotated.
        addendum: Additional text appended directly to the final message.
    """
    if not message:
        message = ""

        if obj_type:
            message += f"The {obj_type} `{name}`"
        else:
            message += f"`{name}`"

        message += " is in beta. It is actively being worked on, so the API may change."

        if addendum:
            message += f" {addendum}"

    warning = LangChainBetaWarning(message)
    warnings.warn(warning, category=LangChainBetaWarning, stacklevel=4)

Subdomains

Called By

Frequently Asked Questions

What does warn_beta() do?
warn_beta() is a function in the langchain codebase, defined in libs/core/langchain_core/_api/beta_decorator.py.
Where is warn_beta() defined?
warn_beta() is defined in libs/core/langchain_core/_api/beta_decorator.py at line 213.
What calls warn_beta()?
warn_beta() is called by 1 function(s): beta.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free