Home / Class/ TestChatDeepSeekUnit Class — langchain Architecture

TestChatDeepSeekUnit Class — langchain Architecture

Architecture documentation for the TestChatDeepSeekUnit class in test_chat_models.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  defacda9_3e2d_2a55_f77b_80bd27247d3c["TestChatDeepSeekUnit"]
  f4b40f56_1158_0e72_1cac_d0121e4eabd8["ChatModelUnitTests"]
  defacda9_3e2d_2a55_f77b_80bd27247d3c -->|extends| f4b40f56_1158_0e72_1cac_d0121e4eabd8
  5ea44688_e61e_5f0e_f4f7_57f0ea8b7bb6["test_chat_models.py"]
  defacda9_3e2d_2a55_f77b_80bd27247d3c -->|defined in| 5ea44688_e61e_5f0e_f4f7_57f0ea8b7bb6
  e634c316_d2f2_bd27_9fc5_8f0757512e62["chat_model_class()"]
  defacda9_3e2d_2a55_f77b_80bd27247d3c -->|method| e634c316_d2f2_bd27_9fc5_8f0757512e62
  df0b49b4_58ae_52ea_df24_4adb5e41729b["init_from_env_params()"]
  defacda9_3e2d_2a55_f77b_80bd27247d3c -->|method| df0b49b4_58ae_52ea_df24_4adb5e41729b
  c1f45e16_70aa_76e0_aa6e_9a2a7f796fcf["chat_model_params()"]
  defacda9_3e2d_2a55_f77b_80bd27247d3c -->|method| c1f45e16_70aa_76e0_aa6e_9a2a7f796fcf
  f85f08d6_c7ac_b6fc_fe90_e6f781c95fb0["get_chat_model()"]
  defacda9_3e2d_2a55_f77b_80bd27247d3c -->|method| f85f08d6_c7ac_b6fc_fe90_e6f781c95fb0

Relationship Graph

Source Code

libs/partners/deepseek/tests/unit_tests/test_chat_models.py lines 66–101

class TestChatDeepSeekUnit(ChatModelUnitTests):
    """Standard unit tests for `ChatDeepSeek` chat model."""

    @property
    def chat_model_class(self) -> type[ChatDeepSeek]:
        """Chat model class being tested."""
        return ChatDeepSeek

    @property
    def init_from_env_params(self) -> tuple[dict, dict, dict]:
        """Parameters to initialize from environment variables."""
        return (
            {
                "DEEPSEEK_API_KEY": "api_key",
                "DEEPSEEK_API_BASE": "api_base",
            },
            {
                "model": MODEL_NAME,
            },
            {
                "api_key": "api_key",
                "api_base": "api_base",
            },
        )

    @property
    def chat_model_params(self) -> dict:
        """Parameters to create chat model instance for testing."""
        return {
            "model": MODEL_NAME,
            "api_key": "api_key",
        }

    def get_chat_model(self) -> ChatDeepSeek:
        """Get a chat model instance for testing."""
        return ChatDeepSeek(**self.chat_model_params)

Frequently Asked Questions

What is the TestChatDeepSeekUnit class?
TestChatDeepSeekUnit is a class in the langchain codebase, defined in libs/partners/deepseek/tests/unit_tests/test_chat_models.py.
Where is TestChatDeepSeekUnit defined?
TestChatDeepSeekUnit is defined in libs/partners/deepseek/tests/unit_tests/test_chat_models.py at line 66.
What does TestChatDeepSeekUnit extend?
TestChatDeepSeekUnit extends ChatModelUnitTests.

Analyze Your Own Codebase

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

Try Supermodel Free