validate_payload() — langchain Function Reference
Architecture documentation for the validate_payload() function in shell_tool.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 577808c7_3d4f_c97e_63e5_a48464fcbc9b["validate_payload()"] c45f8d5a_ae16_b5a8_9671_5eb4440ec745["_ShellToolInput"] 577808c7_3d4f_c97e_63e5_a48464fcbc9b -->|defined in| c45f8d5a_ae16_b5a8_9671_5eb4440ec745 style 577808c7_3d4f_c97e_63e5_a48464fcbc9b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/langchain/agents/middleware/shell_tool.py lines 479–486
def validate_payload(self) -> _ShellToolInput:
if self.command is None and not self.restart:
msg = "Shell tool requires either 'command' or 'restart'."
raise ValueError(msg)
if self.command is not None and self.restart:
msg = "Specify only one of 'command' or 'restart'."
raise ValueError(msg)
return self
Domain
Subdomains
Source
Frequently Asked Questions
What does validate_payload() do?
validate_payload() is a function in the langchain codebase, defined in libs/langchain_v1/langchain/agents/middleware/shell_tool.py.
Where is validate_payload() defined?
validate_payload() is defined in libs/langchain_v1/langchain/agents/middleware/shell_tool.py at line 479.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free