Home / Function/ test_create_chat_result_with_reasoning_content() — langchain Function Reference

test_create_chat_result_with_reasoning_content() — langchain Function Reference

Architecture documentation for the test_create_chat_result_with_reasoning_content() function in test_chat_models.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  2624b386_44c3_cc6d_22d4_03140f4f3693["test_create_chat_result_with_reasoning_content()"]
  530201c5_d88b_5d70_4ba9_c13da0c872e6["TestChatDeepSeekCustomUnit"]
  2624b386_44c3_cc6d_22d4_03140f4f3693 -->|defined in| 530201c5_d88b_5d70_4ba9_c13da0c872e6
  style 2624b386_44c3_cc6d_22d4_03140f4f3693 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/deepseek/tests/unit_tests/test_chat_models.py lines 107–123

    def test_create_chat_result_with_reasoning_content(self) -> None:
        """Test that reasoning_content is properly extracted from response."""
        chat_model = ChatDeepSeek(model=MODEL_NAME, api_key=SecretStr("api_key"))
        mock_message = MagicMock()
        mock_message.content = "Main content"
        mock_message.reasoning_content = "This is the reasoning content"
        mock_message.role = "assistant"
        mock_response = MockOpenAIResponse(
            choices=[MagicMock(message=mock_message)],
            error=None,
        )

        result = chat_model._create_chat_result(mock_response)
        assert (
            result.generations[0].message.additional_kwargs.get("reasoning_content")
            == "This is the reasoning content"
        )

Domain

Subdomains

Frequently Asked Questions

What does test_create_chat_result_with_reasoning_content() do?
test_create_chat_result_with_reasoning_content() is a function in the langchain codebase, defined in libs/partners/deepseek/tests/unit_tests/test_chat_models.py.
Where is test_create_chat_result_with_reasoning_content() defined?
test_create_chat_result_with_reasoning_content() is defined in libs/partners/deepseek/tests/unit_tests/test_chat_models.py at line 107.

Analyze Your Own Codebase

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

Try Supermodel Free