Skip to content

Commit c1ad445

Browse files
authored
docs: fix tavily deprecated warning on crag (#1350)
1 parent 5e9652f commit c1ad445

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/rag/langgraph_crag.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"### Install dependencies\n",
5050
"\n",
5151
"```bash\n",
52-
"npm install cheerio zod langchain @langchain/community @langchain/openai @langchain/core @langchain/textsplitters @langchain/langgraph\n",
52+
"npm install cheerio zod langchain @langchain/community @langchain/openai @langchain/core @langchain/textsplitters @langchain/langgraph @langchain/tavily\n",
5353
"```"
5454
]
5555
},
@@ -206,11 +206,11 @@
206206
},
207207
{
208208
"cell_type": "code",
209-
"execution_count": 4,
209+
"execution_count": null,
210210
"metadata": {},
211211
"outputs": [],
212212
"source": [
213-
"import { TavilySearchResults } from \"@langchain/community/tools/tavily_search\";\n",
213+
"import { TavilySearch } from \"@langchain/tavily\";\n",
214214
"import { Document } from \"@langchain/core/documents\";\n",
215215
"import { z } from \"zod\";\n",
216216
"import { ChatPromptTemplate } from \"@langchain/core/prompts\";\n",
@@ -378,8 +378,8 @@
378378
"): Promise<Partial<typeof GraphState.State>> {\n",
379379
" console.log(\"---WEB SEARCH---\");\n",
380380
"\n",
381-
" const tool = new TavilySearchResults();\n",
382-
" const docs = await tool.invoke({ input: state.question });\n",
381+
" const tool = new TavilySearch();\n",
382+
" const docs = await tool.invoke({ query: state.question });\n",
383383
" const webResults = new Document({ pageContent: docs });\n",
384384
" const newDocuments = state.documents.concat(webResults);\n",
385385
"\n",

0 commit comments

Comments
 (0)