CustomModel Class — langchain Architecture
Architecture documentation for the CustomModel class in test_response_format.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD d019482d_86bf_d8b3_7348_f29e9fcfe384["CustomModel"] 0f829642_e361_67a1_cbca_f82839bbbd31["GenericFakeChatModel"] d019482d_86bf_d8b3_7348_f29e9fcfe384 -->|extends| 0f829642_e361_67a1_cbca_f82839bbbd31 2970c11e_b43a_df0c_1a52_30da10d3689c["test_response_format.py"] d019482d_86bf_d8b3_7348_f29e9fcfe384 -->|defined in| 2970c11e_b43a_df0c_1a52_30da10d3689c 0874fe8b_e998_4a85_2ac5_c9e21542b1cd["bind_tools()"] d019482d_86bf_d8b3_7348_f29e9fcfe384 -->|method| 0874fe8b_e998_4a85_2ac5_c9e21542b1cd
Relationship Graph
Source Code
libs/langchain_v1/tests/unit_tests/agents/test_response_format.py lines 802–812
class CustomModel(GenericFakeChatModel):
tool_bindings: list[Any] = Field(default_factory=list)
def bind_tools(
self,
tools: Sequence[dict[str, Any] | type[BaseModel] | Callable[..., Any] | BaseTool],
**kwargs: Any,
) -> Runnable[LanguageModelInput, AIMessage]:
# Record every tool binding event.
self.tool_bindings.append(tools)
return self
Extends
Source
Frequently Asked Questions
What is the CustomModel class?
CustomModel is a class in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/test_response_format.py.
Where is CustomModel defined?
CustomModel is defined in libs/langchain_v1/tests/unit_tests/agents/test_response_format.py at line 802.
What does CustomModel extend?
CustomModel extends GenericFakeChatModel.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free