BaseFakeCallbackHandler Class — langchain Architecture
Architecture documentation for the BaseFakeCallbackHandler class in _utils.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 889bf008_3ed5_110a_25f1_abb13eecde44["BaseFakeCallbackHandler"] 30343711_5521_a7f5_4f30_8070ee088ac6["_utils.py"] 889bf008_3ed5_110a_25f1_abb13eecde44 -->|defined in| 30343711_5521_a7f5_4f30_8070ee088ac6
Relationship Graph
Source Code
libs/partners/anthropic/tests/unit_tests/_utils.py lines 11–41
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/partners/anthropic/tests/unit_tests/_utils.py.
Where is BaseFakeCallbackHandler defined?
BaseFakeCallbackHandler is defined in libs/partners/anthropic/tests/unit_tests/_utils.py at line 11.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free