Home / Function/ test_astream_with_callback() — langchain Function Reference

test_astream_with_callback() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/partners/mistralai/tests/unit_tests/test_chat_models.py lines 163–167

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

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free