_make_completion_response_from_token() — langchain Function Reference
Architecture documentation for the _make_completion_response_from_token() function in test_chat_models.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD e6827cb1_ada8_3ee6_07e7_d0c434350329["_make_completion_response_from_token()"] aaa4b344_20ed_7fa3_4067_f8f05affc01f["test_chat_models.py"] e6827cb1_ada8_3ee6_07e7_d0c434350329 -->|defined in| aaa4b344_20ed_7fa3_4067_f8f05affc01f 25963247_58b8_c83a_a77c_ca38ec331f50["mock_chat_stream()"] 25963247_58b8_c83a_a77c_ca38ec331f50 -->|calls| e6827cb1_ada8_3ee6_07e7_d0c434350329 85c5e2ea_6951_919b_81ea_bf92a0daf658["mock_chat_astream()"] 85c5e2ea_6951_919b_81ea_bf92a0daf658 -->|calls| e6827cb1_ada8_3ee6_07e7_d0c434350329 style e6827cb1_ada8_3ee6_07e7_d0c434350329 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/mistralai/tests/unit_tests/test_chat_models.py lines 114–125
def _make_completion_response_from_token(token: str) -> dict:
return {
"id": "abc123",
"model": "fake_model",
"choices": [
{
"index": 0,
"delta": {"content": token},
"finish_reason": None,
}
],
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does _make_completion_response_from_token() do?
_make_completion_response_from_token() is a function in the langchain codebase, defined in libs/partners/mistralai/tests/unit_tests/test_chat_models.py.
Where is _make_completion_response_from_token() defined?
_make_completion_response_from_token() is defined in libs/partners/mistralai/tests/unit_tests/test_chat_models.py at line 114.
What calls _make_completion_response_from_token()?
_make_completion_response_from_token() is called by 2 function(s): mock_chat_astream, mock_chat_stream.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free