Home / Function/ test_reasoning_output_invoke() — langchain Function Reference

test_reasoning_output_invoke() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  14576ac6_b6d9_7625_5355_4fee316d6d80["test_reasoning_output_invoke()"]
  af57ae60_607e_c138_9ab0_fb8bb1c5916a["test_chat_models.py"]
  14576ac6_b6d9_7625_5355_4fee316d6d80 -->|defined in| af57ae60_607e_c138_9ab0_fb8bb1c5916a
  style 14576ac6_b6d9_7625_5355_4fee316d6d80 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/groq/tests/integration_tests/test_chat_models.py lines 227–243

def test_reasoning_output_invoke() -> None:
    """Test reasoning output from ChatGroq with invoke."""
    chat = ChatGroq(
        model=REASONING_MODEL_NAME,
        reasoning_format="parsed",
    )
    message = [
        SystemMessage(
            content="You are a helpful assistant that translates English to French."
        ),
        HumanMessage(content="I love programming."),
    ]
    response = chat.invoke(message)
    assert isinstance(response, AIMessage)
    assert "reasoning_content" in response.additional_kwargs
    assert isinstance(response.additional_kwargs["reasoning_content"], str)
    assert len(response.additional_kwargs["reasoning_content"]) > 0

Domain

Subdomains

Frequently Asked Questions

What does test_reasoning_output_invoke() do?
test_reasoning_output_invoke() is a function in the langchain codebase, defined in libs/partners/groq/tests/integration_tests/test_chat_models.py.
Where is test_reasoning_output_invoke() defined?
test_reasoning_output_invoke() is defined in libs/partners/groq/tests/integration_tests/test_chat_models.py at line 227.

Analyze Your Own Codebase

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

Try Supermodel Free