FakeChain Class — langchain Architecture
Architecture documentation for the FakeChain class in test_stdout.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 3b3bfe11_acb4_d9c3_69b8_a09187c9e744["FakeChain"] f3cef70e_11b0_61c9_7ec0_7308f4b45056["Chain"] 3b3bfe11_acb4_d9c3_69b8_a09187c9e744 -->|extends| f3cef70e_11b0_61c9_7ec0_7308f4b45056 e88cb48a_5344_bda0_2779_e219af1a998b["test_stdout.py"] 3b3bfe11_acb4_d9c3_69b8_a09187c9e744 -->|defined in| e88cb48a_5344_bda0_2779_e219af1a998b 9ab365f8_7def_5d28_1b30_f97d418c8afb["input_keys()"] 3b3bfe11_acb4_d9c3_69b8_a09187c9e744 -->|method| 9ab365f8_7def_5d28_1b30_f97d418c8afb dafa871c_646a_5f3a_dc66_745a2520e6fd["output_keys()"] 3b3bfe11_acb4_d9c3_69b8_a09187c9e744 -->|method| dafa871c_646a_5f3a_dc66_745a2520e6fd d4912d4b_1690_a42d_11f2_e8963097770c["_call()"] 3b3bfe11_acb4_d9c3_69b8_a09187c9e744 -->|method| d4912d4b_1690_a42d_11f2_e8963097770c
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/callbacks/test_stdout.py lines 11–34
class FakeChain(Chain):
"""Fake chain class for testing purposes."""
be_correct: bool = True
the_input_keys: list[str] = ["foo"]
the_output_keys: list[str] = ["bar"]
@property
def input_keys(self) -> list[str]:
"""Input keys."""
return self.the_input_keys
@property
def output_keys(self) -> list[str]:
"""Output key of bar."""
return self.the_output_keys
@override
def _call(
self,
inputs: dict[str, str],
run_manager: CallbackManagerForChainRun | None = None,
) -> dict[str, str]:
return {"bar": "bar"}
Extends
Source
Frequently Asked Questions
What is the FakeChain class?
FakeChain is a class in the langchain codebase, defined in libs/langchain/tests/unit_tests/callbacks/test_stdout.py.
Where is FakeChain defined?
FakeChain is defined in libs/langchain/tests/unit_tests/callbacks/test_stdout.py at line 11.
What does FakeChain extend?
FakeChain extends Chain.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free