test_command_resume_raises_not_implemented() — langchain Function Reference
Architecture documentation for the test_command_resume_raises_not_implemented() function in test_wrap_model_call_state_update.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD d4eb17da_4793_52cf_fcf9_26f3e584e89a["test_command_resume_raises_not_implemented()"] f394727c_2dd7_5611_dc5c_e45213fceb3e["TestCommandResumeDisallowed"] d4eb17da_4793_52cf_fcf9_26f3e584e89a -->|defined in| f394727c_2dd7_5611_dc5c_e45213fceb3e style d4eb17da_4793_52cf_fcf9_26f3e584e89a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_wrap_model_call_state_update.py lines 831–850
def test_command_resume_raises_not_implemented(self) -> None:
"""Command with resume in wrap_model_call raises NotImplementedError."""
class ResumeMiddleware(AgentMiddleware):
def wrap_model_call(
self,
request: ModelRequest,
handler: Callable[[ModelRequest], ModelResponse],
) -> ExtendedModelResponse:
response = handler(request)
return ExtendedModelResponse(
model_response=response,
command=Command(resume="some_value"),
)
model = GenericFakeChatModel(messages=iter([AIMessage(content="Hello!")]))
agent = create_agent(model=model, middleware=[ResumeMiddleware()])
with pytest.raises(NotImplementedError, match="Command resume is not yet supported"):
agent.invoke({"messages": [HumanMessage(content="Hi")]})
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_command_resume_raises_not_implemented() do?
test_command_resume_raises_not_implemented() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_wrap_model_call_state_update.py.
Where is test_command_resume_raises_not_implemented() defined?
test_command_resume_raises_not_implemented() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_wrap_model_call_state_update.py at line 831.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free