运行后,当用户提问 "What do you know about LangGraph?",机器人会回答:"LangGraph is a library designed to help build stateful multi-agent applications using language models..."
二、为机器人添加工具调用能力
Assistant: [{'text': "To provide you with accurate and up-to-date information, I'll need to search for the latest trends. Let me do that for you.", 'type': 'text'}, {'id': 'toolu_01Q588CszHaSvvP2MxRq9zRD', 'input': {'query': '最新的人工智能发展趋势'}, 'name': 'tavily_search_results_json', 'type': 'tool_use'}]