mock_completion() — langchain Function Reference
Architecture documentation for the mock_completion() function in test_chat_models.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD ed762fb8_f375_aff1_068d_a83812f4bd84["mock_completion()"] 5bf2e477_37e0_3e98_4042_bc609f2f7f60["test_chat_models.py"] ed762fb8_f375_aff1_068d_a83812f4bd84 -->|defined in| 5bf2e477_37e0_3e98_4042_bc609f2f7f60 style ed762fb8_f375_aff1_068d_a83812f4bd84 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/groq/tests/unit_tests/test_chat_models.py lines 150–166
def mock_completion() -> dict:
return {
"id": "chatcmpl-7fcZavknQda3SQ",
"object": "chat.completion",
"created": 1689989000,
"model": "test-model",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Bar Baz",
},
"finish_reason": "stop",
}
],
}
Domain
Subdomains
Source
Frequently Asked Questions
What does mock_completion() do?
mock_completion() is a function in the langchain codebase, defined in libs/partners/groq/tests/unit_tests/test_chat_models.py.
Where is mock_completion() defined?
mock_completion() is defined in libs/partners/groq/tests/unit_tests/test_chat_models.py at line 150.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free