Home / Function/ _stream() — langchain Function Reference

_stream() — langchain Function Reference

Architecture documentation for the _stream() function in test_base.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  e1cdab52_3997_e14b_771a_5ee6f3d1ae95["_stream()"]
  dbbc1717_f560_457c_a467_427431eb36a0["_AnotherFakeChatModel"]
  e1cdab52_3997_e14b_771a_5ee6f3d1ae95 -->|defined in| dbbc1717_f560_457c_a467_427431eb36a0
  f41f032e_fabc_8233_a43f_f5d5b8b4e23e["_stream()"]
  f41f032e_fabc_8233_a43f_f5d5b8b4e23e -->|calls| e1cdab52_3997_e14b_771a_5ee6f3d1ae95
  f41f032e_fabc_8233_a43f_f5d5b8b4e23e["_stream()"]
  e1cdab52_3997_e14b_771a_5ee6f3d1ae95 -->|calls| f41f032e_fabc_8233_a43f_f5d5b8b4e23e
  style e1cdab52_3997_e14b_771a_5ee6f3d1ae95 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/language_models/chat_models/test_base.py lines 948–954

    def _stream(
        self,
        *_args: Any,
        **_kwargs: Any,
    ) -> Iterator[ChatGenerationChunk]:
        for chunk in self.chunks:
            yield ChatGenerationChunk(message=chunk)

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does _stream() do?
_stream() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/language_models/chat_models/test_base.py.
Where is _stream() defined?
_stream() is defined in libs/core/tests/unit_tests/language_models/chat_models/test_base.py at line 948.
What does _stream() call?
_stream() calls 1 function(s): _stream.
What calls _stream()?
_stream() is called by 1 function(s): _stream.

Analyze Your Own Codebase

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

Try Supermodel Free