_runnable() — langchain Function Reference
Architecture documentation for the _runnable() function in test_fallbacks.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 6ad0850d_2210_9e3e_3868_2e8676344427["_runnable()"] d62d478e_a330_c328_7da4_58e88d780807["test_fallbacks.py"] 6ad0850d_2210_9e3e_3868_2e8676344427 -->|defined in| d62d478e_a330_c328_7da4_58e88d780807 style 6ad0850d_2210_9e3e_3868_2e8676344427 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/runnables/test_fallbacks.py lines 104–114
def _runnable(inputs: dict[str, Any]) -> str:
if inputs["text"] == "foo":
return "first"
if "exception" not in inputs:
msg = "missing exception"
raise ValueError(msg)
if inputs["text"] == "bar":
return "second"
if isinstance(inputs["exception"], ValueError):
raise RuntimeError # noqa: TRY004
return "third"
Domain
Subdomains
Source
Frequently Asked Questions
What does _runnable() do?
_runnable() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/runnables/test_fallbacks.py.
Where is _runnable() defined?
_runnable() is defined in libs/core/tests/unit_tests/runnables/test_fallbacks.py at line 104.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free