from langchain_core.graph import MessageState def assistant(state: MessageState): """ Assistant node that will receive a question and return an answer """ return {"messages": [llm_with_tools.invoke([system_message] + state["messages"])]}