Home / Function/ _is_runnable_type() — langchain Function Reference

_is_runnable_type() — langchain Function Reference

Architecture documentation for the _is_runnable_type() function in fallbacks.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  bff2da62_4ebc_0241_9b4b_1c901f50ea63["_is_runnable_type()"]
  35ab9372_4403_2ed2_c76b_7e9ea066df58["fallbacks.py"]
  bff2da62_4ebc_0241_9b4b_1c901f50ea63 -->|defined in| 35ab9372_4403_2ed2_c76b_7e9ea066df58
  e6762e58_663a_c977_19cf_b16fb57f3dbb["_returns_runnable()"]
  e6762e58_663a_c977_19cf_b16fb57f3dbb -->|calls| bff2da62_4ebc_0241_9b4b_1c901f50ea63
  style bff2da62_4ebc_0241_9b4b_1c901f50ea63 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/runnables/fallbacks.py lines 656–664

def _is_runnable_type(type_: Any) -> bool:
    if inspect.isclass(type_):
        return issubclass(type_, Runnable)
    origin = getattr(type_, "__origin__", None)
    if inspect.isclass(origin):
        return issubclass(origin, Runnable)
    if origin is typing.Union:
        return all(_is_runnable_type(t) for t in type_.__args__)
    return False

Domain

Subdomains

Frequently Asked Questions

What does _is_runnable_type() do?
_is_runnable_type() is a function in the langchain codebase, defined in libs/core/langchain_core/runnables/fallbacks.py.
Where is _is_runnable_type() defined?
_is_runnable_type() is defined in libs/core/langchain_core/runnables/fallbacks.py at line 656.
What calls _is_runnable_type()?
_is_runnable_type() is called by 1 function(s): _returns_runnable.

Analyze Your Own Codebase

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

Try Supermodel Free