ProfileChatModel Class — langchain Architecture
Architecture documentation for the ProfileChatModel class in test_summarization.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 9a97c86c_1c1c_fb7d_5c13_aa9b6b929e3b["ProfileChatModel"] 48aa29b8_65e7_522f_a445_a441eeb6baff["BaseChatModel"] 9a97c86c_1c1c_fb7d_5c13_aa9b6b929e3b -->|extends| 48aa29b8_65e7_522f_a445_a441eeb6baff 1911a463_b67d_0301_5ef1_5c535dafc14a["test_summarization.py"] 9a97c86c_1c1c_fb7d_5c13_aa9b6b929e3b -->|defined in| 1911a463_b67d_0301_5ef1_5c535dafc14a 523641f2_6ab2_a271_c847_fd9988d3d27f["_generate()"] 9a97c86c_1c1c_fb7d_5c13_aa9b6b929e3b -->|method| 523641f2_6ab2_a271_c847_fd9988d3d27f 3c0a7e56_694c_617e_25d0_da88a09874f9["_llm_type()"] 9a97c86c_1c1c_fb7d_5c13_aa9b6b929e3b -->|method| 3c0a7e56_694c_617e_25d0_da88a09874f9
Relationship Graph
Source Code
libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_summarization.py lines 64–81
class ProfileChatModel(BaseChatModel):
"""Mock chat model with profile for testing."""
@override
def _generate(
self,
messages: list[BaseMessage],
stop: list[str] | None = None,
run_manager: CallbackManagerForLLMRun | None = None,
**kwargs: Any,
) -> ChatResult:
return ChatResult(generations=[ChatGeneration(message=AIMessage(content="Summary"))])
profile: ModelProfile | None = ModelProfile(max_input_tokens=1000)
@property
def _llm_type(self) -> str:
return "mock"
Defined In
Extends
Source
Frequently Asked Questions
What is the ProfileChatModel class?
ProfileChatModel is a class in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_summarization.py.
Where is ProfileChatModel defined?
ProfileChatModel is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_summarization.py at line 64.
What does ProfileChatModel extend?
ProfileChatModel extends BaseChatModel.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free