|
43 | 43 | "// process.env.LANGCHAIN_PROJECT = \"Multi-agent Collaboration: LangGraphJS\";\n"
|
44 | 44 | ]
|
45 | 45 | },
|
| 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 | + }, |
46 | 80 | {
|
47 | 81 | "cell_type": "markdown",
|
48 | 82 | "id": "5e4344a7-21df-4d54-90d2-9d19b3416ffb",
|
|
158 | 192 | },
|
159 | 193 | {
|
160 | 194 | "cell_type": "code",
|
161 |
| - "execution_count": 4, |
| 195 | + "execution_count": null, |
162 | 196 | "id": "ca076f3b-a729-4ca9-8f91-05c2ba58d610",
|
163 | 197 | "metadata": {},
|
164 | 198 | "outputs": [],
|
165 | 199 | "source": [
|
166 | 200 | "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", |
168 | 202 | "import { tool } from \"@langchain/core/tools\";\n",
|
169 | 203 | "import * as d3 from \"d3\";\n",
|
170 | 204 | "// ----------ATTENTION----------\n",
|
|
266 | 300 | " }\n",
|
267 | 301 | ")\n",
|
268 | 302 | "\n",
|
269 |
| - "const tavilyTool = new TavilySearchResults();" |
| 303 | + "const tavilyTool = new TavilySearch();" |
270 | 304 | ]
|
271 | 305 | },
|
272 | 306 | {
|
|
0 commit comments