Skip to main content

tools_condition

Function tools_condition 

Source
pub fn tools_condition(state: &MessageState) -> String
Expand description

Standard routing function: returns “tools” if last message has tool_calls, else END.

This is the standard condition function used with add_conditional_edges to route between an agent node and a tools node.