Home / Function/ _is_annotated_type() — langchain Function Reference

_is_annotated_type() — langchain Function Reference

Architecture documentation for the _is_annotated_type() function in base.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  9d692415_3fb4_d8a7_d85b_fa59eee193f5["_is_annotated_type()"]
  80cebff4_efbd_4311_85e9_de0dc81a7eee["base.py"]
  9d692415_3fb4_d8a7_d85b_fa59eee193f5 -->|defined in| 80cebff4_efbd_4311_85e9_de0dc81a7eee
  9844b114_d1bc_aba8_a452_29f3abc0d0a8["_get_annotation_description()"]
  9844b114_d1bc_aba8_a452_29f3abc0d0a8 -->|calls| 9d692415_3fb4_d8a7_d85b_fa59eee193f5
  style 9d692415_3fb4_d8a7_d85b_fa59eee193f5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/tools/base.py lines 93–102

def _is_annotated_type(typ: type[Any]) -> bool:
    """Check if a type is an `Annotated` type.

    Args:
        typ: The type to check.

    Returns:
        `True` if the type is an `Annotated` type, `False` otherwise.
    """
    return get_origin(typ) in {typing.Annotated, typing_extensions.Annotated}

Subdomains

Frequently Asked Questions

What does _is_annotated_type() do?
_is_annotated_type() is a function in the langchain codebase, defined in libs/core/langchain_core/tools/base.py.
Where is _is_annotated_type() defined?
_is_annotated_type() is defined in libs/core/langchain_core/tools/base.py at line 93.
What calls _is_annotated_type()?
_is_annotated_type() is called by 1 function(s): _get_annotation_description.

Analyze Your Own Codebase

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

Try Supermodel Free