_get_get_session_history() — langchain Function Reference
Architecture documentation for the _get_get_session_history() function in test_history.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD e035a3b1_d1a1_c458_c801_af1fc0272f8b["_get_get_session_history()"] 0af0dfde_fe33_f3e5_b5e6_a3d18260dc67["test_history.py"] e035a3b1_d1a1_c458_c801_af1fc0272f8b -->|defined in| 0af0dfde_fe33_f3e5_b5e6_a3d18260dc67 f00b6048_fbb2_8ea1_99d8_efd8fedde6a8["test_input_messages()"] f00b6048_fbb2_8ea1_99d8_efd8fedde6a8 -->|calls| e035a3b1_d1a1_c458_c801_af1fc0272f8b 99897380_ac0a_163f_7d7e_37d8089e1b87["test_input_messages_async()"] 99897380_ac0a_163f_7d7e_37d8089e1b87 -->|calls| e035a3b1_d1a1_c458_c801_af1fc0272f8b 974d7966_5254_bf08_09db_6d4176f81152["test_input_dict()"] 974d7966_5254_bf08_09db_6d4176f81152 -->|calls| e035a3b1_d1a1_c458_c801_af1fc0272f8b f62997c2_cefe_39ab_d23c_34be867fa346["test_input_dict_async()"] f62997c2_cefe_39ab_d23c_34be867fa346 -->|calls| e035a3b1_d1a1_c458_c801_af1fc0272f8b 2b466ea2_b27e_a02c_322f_f63a986e306c["test_input_dict_with_history_key()"] 2b466ea2_b27e_a02c_322f_f63a986e306c -->|calls| e035a3b1_d1a1_c458_c801_af1fc0272f8b 3ac85c1d_fd3a_ccf5_3f07_e378439b9add["test_input_dict_with_history_key_async()"] 3ac85c1d_fd3a_ccf5_3f07_e378439b9add -->|calls| e035a3b1_d1a1_c458_c801_af1fc0272f8b 49dcb0fb_e7dc_6bcc_5509_f9ba321b23c5["test_output_message()"] 49dcb0fb_e7dc_6bcc_5509_f9ba321b23c5 -->|calls| e035a3b1_d1a1_c458_c801_af1fc0272f8b 8016bd72_6842_8850_f0fa_ef50171a8f15["test_output_message_async()"] 8016bd72_6842_8850_f0fa_ef50171a8f15 -->|calls| e035a3b1_d1a1_c458_c801_af1fc0272f8b fb914e55_cda1_4c5a_942d_fe65622ae787["test_input_messages_output_message()"] fb914e55_cda1_4c5a_942d_fe65622ae787 -->|calls| e035a3b1_d1a1_c458_c801_af1fc0272f8b 43350645_b945_ac3a_b482_e4aa8dfac99c["test_input_messages_output_message_async()"] 43350645_b945_ac3a_b482_e4aa8dfac99c -->|calls| e035a3b1_d1a1_c458_c801_af1fc0272f8b e95a229c_6616_58ca_5c03_a48c0650f902["test_output_messages()"] e95a229c_6616_58ca_5c03_a48c0650f902 -->|calls| e035a3b1_d1a1_c458_c801_af1fc0272f8b bfe5e716_b6ef_d97a_a9fd_0be800d4a225["test_output_messages_async()"] bfe5e716_b6ef_d97a_a9fd_0be800d4a225 -->|calls| e035a3b1_d1a1_c458_c801_af1fc0272f8b 22e57df8_e0fa_02d4_e77a_0e173bf93e34["test_output_dict()"] 22e57df8_e0fa_02d4_e77a_0e173bf93e34 -->|calls| e035a3b1_d1a1_c458_c801_af1fc0272f8b style e035a3b1_d1a1_c458_c801_af1fc0272f8b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/runnables/test_history.py lines 38–51
def _get_get_session_history(
*,
store: dict[str, InMemoryChatMessageHistory] | None = None,
) -> Callable[..., InMemoryChatMessageHistory]:
chat_history_store = store if store is not None else {}
def get_session_history(
session_id: str, **_kwargs: Any
) -> InMemoryChatMessageHistory:
if session_id not in chat_history_store:
chat_history_store[session_id] = InMemoryChatMessageHistory()
return chat_history_store[session_id]
return get_session_history
Domain
Subdomains
Called By
- test_get_input_schema_input_dict()
- test_get_input_schema_input_messages()
- test_get_output_messages_no_value_error()
- test_get_output_messages_with_value_error()
- test_get_output_schema()
- test_input_dict()
- test_input_dict_async()
- test_input_dict_with_history_key()
- test_input_dict_with_history_key_async()
- test_input_messages()
- test_input_messages_async()
- test_input_messages_output_message()
- test_input_messages_output_message_async()
- test_output_dict()
- test_output_dict_async()
- test_output_message()
- test_output_message_async()
- test_output_messages()
- test_output_messages_async()
Source
Frequently Asked Questions
What does _get_get_session_history() do?
_get_get_session_history() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/runnables/test_history.py.
Where is _get_get_session_history() defined?
_get_get_session_history() is defined in libs/core/tests/unit_tests/runnables/test_history.py at line 38.
What calls _get_get_session_history()?
_get_get_session_history() is called by 19 function(s): test_get_input_schema_input_dict, test_get_input_schema_input_messages, test_get_output_messages_no_value_error, test_get_output_messages_with_value_error, test_get_output_schema, test_input_dict, test_input_dict_async, test_input_dict_with_history_key, and 11 more.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free