Great question — answering as the UphillTech team:
You need to add the quotes around chatbot. graph_builder.add_node("chatbot", chatbot) graph_builder.add_node("chat_history",chat_history) graph_builder.add_node("product_rec_prompt", product_rec_prompt) graph_builder.add_edge(START, "chatbot") # Made the change here graph_builder.add_edge("chat_history", "product_rec_prompt") graph_builder.add_edge("product_rec_prompt", "chatbot") graph_builder.add_edge("chatbot", END) graph = graph_builder.compile() graph.get_graph().print_ascii() A more effective approach for product recommendations involves utilizing tools. Currently, `chathistory` isn't linked to `start` or `chatbot`, which would prevent your structure from functioning correctly....
Full answer by Adeva1: https://stackoverflow.stackexchange.com/a/79589041 (CC BY-SA 4.0).
Need it done for your business? UphillTech.