chore(langchain): simplifying HITL condition (#33065)

Simplifying condition
This commit is contained in:
Sydney Runkle
2025-09-23 17:24:14 -04:00
committed by GitHub
parent 48b05224ad
commit b5720ff17a

View File

@@ -139,11 +139,7 @@ class HumanInTheLoopMiddleware(AgentMiddleware):
allow_respond=True,
)
elif any(
[
tool_config.get("allow_accept", False),
tool_config.get("allow_edit", False),
tool_config.get("allow_respond", False),
]
tool_config.get(x, False) for x in ["allow_accept", "allow_edit", "allow_respond"]
):
resolved_tool_configs[tool_name] = tool_config
self.tool_configs = resolved_tool_configs