BaseFakeCallbackHandler Class — langchain Architecture
Architecture documentation for the BaseFakeCallbackHandler class in fake_callback_handler.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD f4c28ce8_de58_155f_bbaf_f94d8591b416["BaseFakeCallbackHandler"] 729da20b_aca8_b25d_9976_5af23b3e4b63["fake_callback_handler.py"] f4c28ce8_de58_155f_bbaf_f94d8591b416 -->|defined in| 729da20b_aca8_b25d_9976_5af23b3e4b63
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/callbacks/fake_callback_handler.py lines 13–43
class BaseFakeCallbackHandler(BaseModel):
"""Base fake callback handler for testing."""
starts: int = 0
ends: int = 0
errors: int = 0
text: int = 0
ignore_llm_: bool = False
ignore_chain_: bool = False
ignore_agent_: bool = False
ignore_retriever_: bool = False
ignore_chat_model_: bool = False
# to allow for similar callback handlers that are not technically equal
fake_id: str | None = None
# add finer-grained counters for easier debugging of failing tests
chain_starts: int = 0
chain_ends: int = 0
llm_starts: int = 0
llm_ends: int = 0
llm_streams: int = 0
tool_starts: int = 0
tool_ends: int = 0
agent_actions: int = 0
agent_ends: int = 0
chat_model_starts: int = 0
retriever_starts: int = 0
retriever_ends: int = 0
retriever_errors: int = 0
retries: int = 0
Source
Frequently Asked Questions
What is the BaseFakeCallbackHandler class?
BaseFakeCallbackHandler is a class in the langchain codebase, defined in libs/langchain/tests/unit_tests/callbacks/fake_callback_handler.py.
Where is BaseFakeCallbackHandler defined?
BaseFakeCallbackHandler is defined in libs/langchain/tests/unit_tests/callbacks/fake_callback_handler.py at line 13.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free