test_reasoning_content_streaming() — langchain Function Reference
Architecture documentation for the test_reasoning_content_streaming() function in test_chat_models.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 4afe41d8_2cf5_9c91_b11d_19aecb682e96["test_reasoning_content_streaming()"] d5b2c663_3bef_9fee_fbc6_8289d974a7e3["test_chat_models.py"] 4afe41d8_2cf5_9c91_b11d_19aecb682e96 -->|defined in| d5b2c663_3bef_9fee_fbc6_8289d974a7e3 style 4afe41d8_2cf5_9c91_b11d_19aecb682e96 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/deepseek/tests/integration_tests/test_chat_models.py lines 66–81
def test_reasoning_content_streaming() -> None:
"""Test reasoning content with streaming."""
chat_model = ChatDeepSeek(model="deepseek-reasoner")
full: BaseMessageChunk | None = None
for chunk in chat_model.stream("What is 3^3?"):
full = chunk if full is None else full + chunk
assert isinstance(full, AIMessageChunk)
assert full.additional_kwargs["reasoning_content"]
content_blocks = full.content_blocks
assert content_blocks is not None
assert len(content_blocks) > 0
reasoning_blocks = [
block for block in content_blocks if block.get("type") == "reasoning"
]
assert len(reasoning_blocks) > 0
Domain
Subdomains
Source
Frequently Asked Questions
What does test_reasoning_content_streaming() do?
test_reasoning_content_streaming() is a function in the langchain codebase, defined in libs/partners/deepseek/tests/integration_tests/test_chat_models.py.
Where is test_reasoning_content_streaming() defined?
test_reasoning_content_streaming() is defined in libs/partners/deepseek/tests/integration_tests/test_chat_models.py at line 66.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free