Home / Function/ test__astream_no_reasoning() — langchain Function Reference

test__astream_no_reasoning() — langchain Function Reference

Architecture documentation for the test__astream_no_reasoning() function in test_llms.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  44f380bd_6a6c_c7d5_79e5_98bfc2ec77e5["test__astream_no_reasoning()"]
  b375279a_4970_f212_b93f_b3ffc97dc9d8["test_llms.py"]
  44f380bd_6a6c_c7d5_79e5_98bfc2ec77e5 -->|defined in| b375279a_4970_f212_b93f_b3ffc97dc9d8
  style 44f380bd_6a6c_c7d5_79e5_98bfc2ec77e5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/ollama/tests/integration_tests/test_llms.py lines 108–124

async def test__astream_no_reasoning(model: str) -> None:
    """Test low-level async chunk streaming with `reasoning=False`."""
    llm = OllamaLLM(model=model, num_ctx=2**12)

    result_chunk = None
    async for chunk in llm._astream(SAMPLE):
        assert isinstance(chunk, GenerationChunk)
        if result_chunk is None:
            result_chunk = chunk
        else:
            result_chunk += chunk

    # The final result must be a GenerationChunk with visible content
    assert isinstance(result_chunk, GenerationChunk)
    assert result_chunk.text
    assert result_chunk.generation_info
    assert not result_chunk.generation_info.get("reasoning_content")

Domain

Subdomains

Frequently Asked Questions

What does test__astream_no_reasoning() do?
test__astream_no_reasoning() is a function in the langchain codebase, defined in libs/partners/ollama/tests/integration_tests/test_llms.py.
Where is test__astream_no_reasoning() defined?
test__astream_no_reasoning() is defined in libs/partners/ollama/tests/integration_tests/test_llms.py at line 108.

Analyze Your Own Codebase

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

Try Supermodel Free