Home / Class/ ImportErrorProfileModel Class — langchain Architecture

ImportErrorProfileModel Class — langchain Architecture

Architecture documentation for the ImportErrorProfileModel class in test_summarization.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  2bd87741_996f_6502_196d_5b995cda2215["ImportErrorProfileModel"]
  48aa29b8_65e7_522f_a445_a441eeb6baff["BaseChatModel"]
  2bd87741_996f_6502_196d_5b995cda2215 -->|extends| 48aa29b8_65e7_522f_a445_a441eeb6baff
  1911a463_b67d_0301_5ef1_5c535dafc14a["test_summarization.py"]
  2bd87741_996f_6502_196d_5b995cda2215 -->|defined in| 1911a463_b67d_0301_5ef1_5c535dafc14a
  c2fbded0_d129_815e_f11f_8476c31a1c49["_generate()"]
  2bd87741_996f_6502_196d_5b995cda2215 -->|method| c2fbded0_d129_815e_f11f_8476c31a1c49
  87c1b2d7_74aa_6d6d_b2ad_749a8a4e2289["_llm_type()"]
  2bd87741_996f_6502_196d_5b995cda2215 -->|method| 87c1b2d7_74aa_6d6d_b2ad_749a8a4e2289
  26b2adee_abce_5e59_70dc_1f784c472bfb["__getattribute__()"]
  2bd87741_996f_6502_196d_5b995cda2215 -->|method| 26b2adee_abce_5e59_70dc_1f784c472bfb

Relationship Graph

Source Code

libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_summarization.py lines 393–413

    class ImportErrorProfileModel(BaseChatModel):
        @override
        def _generate(
            self,
            messages: list[BaseMessage],
            stop: list[str] | None = None,
            run_manager: CallbackManagerForLLMRun | None = None,
            **kwargs: Any,
        ) -> ChatResult:
            raise NotImplementedError

        @property
        def _llm_type(self) -> str:
            return "mock"

        # NOTE: Using __getattribute__ because @property cannot override Pydantic fields.
        def __getattribute__(self, name: str) -> Any:
            if name == "profile":
                msg = "Profile not available"
                raise AttributeError(msg)
            return super().__getattribute__(name)

Extends

Frequently Asked Questions

What is the ImportErrorProfileModel class?
ImportErrorProfileModel is a class in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_summarization.py.
Where is ImportErrorProfileModel defined?
ImportErrorProfileModel is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_summarization.py at line 393.
What does ImportErrorProfileModel extend?
ImportErrorProfileModel extends BaseChatModel.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free