Home / File/ __init__.py — langchain Source File

__init__.py — langchain Source File

Architecture documentation for __init__.py, a python file in the langchain codebase. 7 imports, 0 dependents.

File python 7 imports

Entity Profile

Dependency Diagram

graph LR
  0503e4d1_290f_c19e_16b4_3ba5dda340a4["__init__.py"]
  15b6f2ac_8a3b_5719_0e4d_4652995195ed["langchain_core.runnables.base"]
  0503e4d1_290f_c19e_16b4_3ba5dda340a4 --> 15b6f2ac_8a3b_5719_0e4d_4652995195ed
  25c708ed_fc9e_1a08_6254_6541e531e7a0["langchain_core.runnables.branch"]
  0503e4d1_290f_c19e_16b4_3ba5dda340a4 --> 25c708ed_fc9e_1a08_6254_6541e531e7a0
  a8ec7563_2814_99b3_c6da_61c599efc542["langchain_core.runnables.config"]
  0503e4d1_290f_c19e_16b4_3ba5dda340a4 --> a8ec7563_2814_99b3_c6da_61c599efc542
  86b78fc5_5c74_1638_7c9c_d2967d77c1c6["langchain_core.runnables.fallbacks"]
  0503e4d1_290f_c19e_16b4_3ba5dda340a4 --> 86b78fc5_5c74_1638_7c9c_d2967d77c1c6
  f6ac5788_e423_ce13_2122_3f47573d9d08["langchain_core.runnables.passthrough"]
  0503e4d1_290f_c19e_16b4_3ba5dda340a4 --> f6ac5788_e423_ce13_2122_3f47573d9d08
  33702c6a_b0d4_9d9a_0743_8bc507e8ff74["langchain_core.runnables.router"]
  0503e4d1_290f_c19e_16b4_3ba5dda340a4 --> 33702c6a_b0d4_9d9a_0743_8bc507e8ff74
  b4920617_3c91_2457_3f8c_84ba49f64322["langchain_core.runnables.utils"]
  0503e4d1_290f_c19e_16b4_3ba5dda340a4 --> b4920617_3c91_2457_3f8c_84ba49f64322
  style 0503e4d1_290f_c19e_16b4_3ba5dda340a4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"""LangChain **Runnable** and the **LangChain Expression Language (LCEL)**.

The LangChain Expression Language (LCEL) offers a declarative method to build
production-grade programs that harness the power of LLMs.

Programs created using LCEL and LangChain Runnables inherently support
synchronous, asynchronous, batch, and streaming operations.

Support for **async** allows servers hosting LCEL based programs to scale better
for higher concurrent loads.

**Streaming** of intermediate outputs as they're being generated allows for
creating more responsive UX.

This module contains schema and implementation of LangChain Runnables primitives.
"""

from langchain_core.runnables.base import (
    Runnable,
    RunnableBinding,
    RunnableGenerator,
    RunnableLambda,
    RunnableMap,
    RunnableParallel,
    RunnableSequence,
    RunnableSerializable,
)
from langchain_core.runnables.branch import RunnableBranch
from langchain_core.runnables.config import RunnableConfig, patch_config
from langchain_core.runnables.fallbacks import RunnableWithFallbacks
from langchain_core.runnables.passthrough import RunnablePassthrough
from langchain_core.runnables.router import RouterInput, RouterRunnable
from langchain_core.runnables.utils import (
    ConfigurableField,
    ConfigurableFieldMultiOption,
    ConfigurableFieldSingleOption,
)

__all__ = [
    "ConfigurableField",
    "ConfigurableFieldMultiOption",
    "ConfigurableFieldSingleOption",
    "RouterInput",
    "RouterRunnable",
    "Runnable",
    "RunnableBinding",
    "RunnableBranch",
    "RunnableConfig",
    "RunnableGenerator",
    "RunnableLambda",
    "RunnableMap",
    "RunnableParallel",
    "RunnablePassthrough",
    "RunnableSequence",
    "RunnableSerializable",
    "RunnableWithFallbacks",
    "patch_config",
]

Dependencies

  • langchain_core.runnables.base
  • langchain_core.runnables.branch
  • langchain_core.runnables.config
  • langchain_core.runnables.fallbacks
  • langchain_core.runnables.passthrough
  • langchain_core.runnables.router
  • langchain_core.runnables.utils

Frequently Asked Questions

What does __init__.py do?
__init__.py is a source file in the langchain codebase, written in python.
What does __init__.py depend on?
__init__.py imports 7 module(s): langchain_core.runnables.base, langchain_core.runnables.branch, langchain_core.runnables.config, langchain_core.runnables.fallbacks, langchain_core.runnables.passthrough, langchain_core.runnables.router, langchain_core.runnables.utils.
Where is __init__.py in the architecture?
__init__.py is located at libs/langchain/langchain_classic/schema/runnable/__init__.py (directory: libs/langchain/langchain_classic/schema/runnable).

Analyze Your Own Codebase

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

Try Supermodel Free