_TestCallbackHandler Class — langchain Architecture
Architecture documentation for the _TestCallbackHandler class in chat_models.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 212e5aee_8449_326c_9647_f58e4e338d9a["_TestCallbackHandler"] af283d05_75a6_5813_267b_f03a32501460["BaseCallbackHandler"] 212e5aee_8449_326c_9647_f58e4e338d9a -->|extends| af283d05_75a6_5813_267b_f03a32501460 c97ed773_97f8_2190_c0e8_546293fe345b["chat_models.py"] 212e5aee_8449_326c_9647_f58e4e338d9a -->|defined in| c97ed773_97f8_2190_c0e8_546293fe345b 0c051d26_948d_9a69_76a8_6eac2028941c["__init__()"] 212e5aee_8449_326c_9647_f58e4e338d9a -->|method| 0c051d26_948d_9a69_76a8_6eac2028941c d2be06ee_6238_03bd_b802_0d4846c579c2["on_chat_model_start()"] 212e5aee_8449_326c_9647_f58e4e338d9a -->|method| d2be06ee_6238_03bd_b802_0d4846c579c2
Relationship Graph
Source Code
libs/standard-tests/langchain_tests/integration_tests/chat_models.py lines 77–93
class _TestCallbackHandler(BaseCallbackHandler):
options: list[dict[str, Any] | None]
def __init__(self) -> None:
super().__init__()
self.options = []
@override
def on_chat_model_start(
self,
serialized: Any,
messages: Any,
*,
options: dict[str, Any] | None = None,
**kwargs: Any,
) -> None:
self.options.append(options)
Extends
Source
Frequently Asked Questions
What is the _TestCallbackHandler class?
_TestCallbackHandler is a class in the langchain codebase, defined in libs/standard-tests/langchain_tests/integration_tests/chat_models.py.
Where is _TestCallbackHandler defined?
_TestCallbackHandler is defined in libs/standard-tests/langchain_tests/integration_tests/chat_models.py at line 77.
What does _TestCallbackHandler extend?
_TestCallbackHandler extends BaseCallbackHandler.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free