mock_glm4_completion() — langchain Function Reference
Architecture documentation for the mock_glm4_completion() function in test_base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD bb9ce99b_dc44_e10f_c20a_b2d7dd598b4e["mock_glm4_completion()"] 48232d20_f8c1_b597_14fa_7dc407e9bfe5["test_base.py"] bb9ce99b_dc44_e10f_c20a_b2d7dd598b4e -->|defined in| 48232d20_f8c1_b597_14fa_7dc407e9bfe5 style bb9ce99b_dc44_e10f_c20a_b2d7dd598b4e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/openai/tests/unit_tests/chat_models/test_base.py lines 386–393
def mock_glm4_completion() -> list:
list_chunk_data = GLM4_STREAM_META.split("\n")
result_list = []
for msg in list_chunk_data:
if msg != "[DONE]":
result_list.append(json.loads(msg))
return result_list
Domain
Subdomains
Source
Frequently Asked Questions
What does mock_glm4_completion() do?
mock_glm4_completion() is a function in the langchain codebase, defined in libs/partners/openai/tests/unit_tests/chat_models/test_base.py.
Where is mock_glm4_completion() defined?
mock_glm4_completion() is defined in libs/partners/openai/tests/unit_tests/chat_models/test_base.py at line 386.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free