mock_chat_astream() — langchain Function Reference
Architecture documentation for the mock_chat_astream() function in test_chat_models.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 85c5e2ea_6951_919b_81ea_bf92a0daf658["mock_chat_astream()"] aaa4b344_20ed_7fa3_4067_f8f05affc01f["test_chat_models.py"] 85c5e2ea_6951_919b_81ea_bf92a0daf658 -->|defined in| aaa4b344_20ed_7fa3_4067_f8f05affc01f e6827cb1_ada8_3ee6_07e7_d0c434350329["_make_completion_response_from_token()"] 85c5e2ea_6951_919b_81ea_bf92a0daf658 -->|calls| e6827cb1_ada8_3ee6_07e7_d0c434350329 style 85c5e2ea_6951_919b_81ea_bf92a0daf658 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/mistralai/tests/unit_tests/test_chat_models.py lines 136–141
async def mock_chat_astream(*args: Any, **kwargs: Any) -> AsyncGenerator:
async def it() -> AsyncGenerator:
for token in ["Hello", " how", " can", " I", " help", "?"]:
yield _make_completion_response_from_token(token)
return it()
Domain
Subdomains
Source
Frequently Asked Questions
What does mock_chat_astream() do?
mock_chat_astream() is a function in the langchain codebase, defined in libs/partners/mistralai/tests/unit_tests/test_chat_models.py.
Where is mock_chat_astream() defined?
mock_chat_astream() is defined in libs/partners/mistralai/tests/unit_tests/test_chat_models.py at line 136.
What does mock_chat_astream() call?
mock_chat_astream() calls 1 function(s): _make_completion_response_from_token.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free