test_get_input_schema_input_dict() — langchain Function Reference
Architecture documentation for the test_get_input_schema_input_dict() function in test_history.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD a6f829af_4d7c_2a80_d49e_f3db6da1aee3["test_get_input_schema_input_dict()"] 0af0dfde_fe33_f3e5_b5e6_a3d18260dc67["test_history.py"] a6f829af_4d7c_2a80_d49e_f3db6da1aee3 -->|defined in| 0af0dfde_fe33_f3e5_b5e6_a3d18260dc67 e035a3b1_d1a1_c458_c801_af1fc0272f8b["_get_get_session_history()"] a6f829af_4d7c_2a80_d49e_f3db6da1aee3 -->|calls| e035a3b1_d1a1_c458_c801_af1fc0272f8b style a6f829af_4d7c_2a80_d49e_f3db6da1aee3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/runnables/test_history.py lines 456–487
def test_get_input_schema_input_dict() -> None:
class RunnableWithChatHistoryInput(BaseModel):
input: str | BaseMessage | Sequence[BaseMessage]
runnable = RunnableLambda[Any, dict[str, list[AIMessage]]](
lambda params: {
"output": [
AIMessage(
content="you said: "
+ "\n".join(
[
str(m.content)
for m in params["history"]
if isinstance(m, HumanMessage)
]
+ [params["input"]]
)
)
]
}
)
get_session_history = _get_get_session_history()
with_history = RunnableWithMessageHistory(
runnable,
get_session_history,
input_messages_key="input",
history_messages_key="history",
output_messages_key="output",
)
assert _schema(with_history.get_input_schema()) == _schema(
RunnableWithChatHistoryInput
)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_get_input_schema_input_dict() do?
test_get_input_schema_input_dict() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/runnables/test_history.py.
Where is test_get_input_schema_input_dict() defined?
test_get_input_schema_input_dict() is defined in libs/core/tests/unit_tests/runnables/test_history.py at line 456.
What does test_get_input_schema_input_dict() call?
test_get_input_schema_input_dict() calls 1 function(s): _get_get_session_history.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free