Home / Function/ test_stream_with_callback() — langchain Function Reference

test_stream_with_callback() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  b08f5ea2_316c_326d_9d18_6fd6aa4450f2["test_stream_with_callback()"]
  aaa4b344_20ed_7fa3_4067_f8f05affc01f["test_chat_models.py"]
  b08f5ea2_316c_326d_9d18_6fd6aa4450f2 -->|defined in| aaa4b344_20ed_7fa3_4067_f8f05affc01f
  style b08f5ea2_316c_326d_9d18_6fd6aa4450f2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/mistralai/tests/unit_tests/test_chat_models.py lines 155–159

def test_stream_with_callback() -> None:
    callback = MyCustomHandler()
    chat = ChatMistralAI(callbacks=[callback])
    for token in chat.stream("Hello"):
        assert callback.last_token == token.content

Domain

Subdomains

Frequently Asked Questions

What does test_stream_with_callback() do?
test_stream_with_callback() is a function in the langchain codebase, defined in libs/partners/mistralai/tests/unit_tests/test_chat_models.py.
Where is test_stream_with_callback() defined?
test_stream_with_callback() is defined in libs/partners/mistralai/tests/unit_tests/test_chat_models.py at line 155.

Analyze Your Own Codebase

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

Try Supermodel Free