diff --git a/libs/langgraph/README.md b/libs/langgraph/README.md index bc293e031..7fdc04b28 100644 --- a/libs/langgraph/README.md +++ b/libs/langgraph/README.md @@ -82,7 +82,7 @@ tool_node = ToolNode(tools) model = ChatAnthropic(model="claude-3-5-sonnet-20240620", temperature=0).bind_tools(tools) # Define the function that determines whether to continue or not -def should_continue(state: MessagesState): +def should_continue(state: MessagesState) -> Union[Literal["tools"], type(END)]: messages = state['messages'] last_message = messages[-1] # If the LLM makes a tool call, then we route to the "tools" node