Home / Function/ test__stream_no_reasoning() — langchain Function Reference

test__stream_no_reasoning() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/partners/ollama/tests/integration_tests/test_llms.py lines 88–104

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

    result_chunk = None
    for chunk in llm._stream(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__stream_no_reasoning() do?
test__stream_no_reasoning() is a function in the langchain codebase, defined in libs/partners/ollama/tests/integration_tests/test_llms.py.
Where is test__stream_no_reasoning() defined?
test__stream_no_reasoning() is defined in libs/partners/ollama/tests/integration_tests/test_llms.py at line 88.

Analyze Your Own Codebase

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

Try Supermodel Free