课程: Build AI Agents and Chatbots with LangGraph
免费学习该课程!
今天就开通帐号,24,700 门业界名师课程任您挑!
Set up and execute the LangGraph chatbot - LangChain教程
课程: Build AI Agents and Chatbots with LangGraph
Set up and execute the LangGraph chatbot
- [Instructor] The agent we set up in the previous video already has conversation memory, so the chat bot is implicitly set up now. To test the chat bot, we will create a series of prompts. This includes greetings, query for an order, updating an order, a follow-up question, and a question about an invalid order. We create a config object with a thread id. We then iterate through the list of input prompts and call the agent with all the parameters. We print the input question and the final agent message like a conversation. Let's now review the results. For the greeting from the user, the agent responds back with an equal greeting. It also mentions its purpose. For the question about an order id, the agent responds with the correct details. It also asks if the user has any more questions. For adding one more laptop to the order, it shows the exact count to which the order has been updated. We ask for the order details again, it uses conversation memory to determine the order ID and…