Skip to content

Commit 22aaa29

Browse files
authored
doc: multi agent collaboration. fix tavily and setup (#1352)
1 parent d0a0fa3 commit 22aaa29

File tree

1 file changed

+37
-3
lines changed

1 file changed

+37
-3
lines changed

examples/multi_agent/multi_agent_collaboration.ipynb

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,40 @@
4343
"// process.env.LANGCHAIN_PROJECT = \"Multi-agent Collaboration: LangGraphJS\";\n"
4444
]
4545
},
46+
{
47+
"cell_type": "markdown",
48+
"id": "b6686ec7",
49+
"metadata": {},
50+
"source": [
51+
"## Setup\n",
52+
"\n",
53+
"### Load env vars\n",
54+
"\n",
55+
"Add a `.env` variable in the root of the repo folder with your variables."
56+
]
57+
},
58+
{
59+
"cell_type": "code",
60+
"execution_count": null,
61+
"id": "8af329ba",
62+
"metadata": {},
63+
"outputs": [],
64+
"source": [
65+
"import \"dotenv/config\";"
66+
]
67+
},
68+
{
69+
"cell_type": "markdown",
70+
"id": "b84a81aa",
71+
"metadata": {},
72+
"source": [
73+
"### Install dependencies\n",
74+
"\n",
75+
"```bash\n",
76+
"npm install @langchain/core @langchain/openai @langchain/langgraph @langchain/tavily zod canvas d3 tslab\n",
77+
"```"
78+
]
79+
},
4680
{
4781
"cell_type": "markdown",
4882
"id": "5e4344a7-21df-4d54-90d2-9d19b3416ffb",
@@ -158,13 +192,13 @@
158192
},
159193
{
160194
"cell_type": "code",
161-
"execution_count": 4,
195+
"execution_count": null,
162196
"id": "ca076f3b-a729-4ca9-8f91-05c2ba58d610",
163197
"metadata": {},
164198
"outputs": [],
165199
"source": [
166200
"import \"tsx\"; // Only for running this in TSLab. See: https://github.com/yunabe/tslab/issues/72\n",
167-
"import { TavilySearchResults } from \"@langchain/community/tools/tavily_search\";\n",
201+
"import { TavilySearch } from \"@langchain/tavily\";\n",
168202
"import { tool } from \"@langchain/core/tools\";\n",
169203
"import * as d3 from \"d3\";\n",
170204
"// ----------ATTENTION----------\n",
@@ -266,7 +300,7 @@
266300
" }\n",
267301
")\n",
268302
"\n",
269-
"const tavilyTool = new TavilySearchResults();"
303+
"const tavilyTool = new TavilySearch();"
270304
]
271305
},
272306
{

0 commit comments

Comments
 (0)