Skip to content

Commit a4b07c0

Browse files
author
jarvis.dang
committed
bug fix
1 parent e6b0f97 commit a4b07c0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

recipes/use_cases/agents/langchain/langgraph-rag-agent.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@
238238
"rag_chain = prompt | llm | StrOutputParser()\n",
239239
"\n",
240240
"# Run\n",
241-
"generation = rag_chain.invoke({\"context\": docs, \"question\": question})\n",
241+
"generation = rag_chain.invoke({\"context\": format_docs(docs), \"question\": question})\n",
242242
"print(generation)"
243243
]
244244
},
@@ -330,6 +330,7 @@
330330
"source": [
331331
"from typing_extensions import TypedDict\n",
332332
"from typing import List\n",
333+
"from langchain.schema import Document\n",
333334
"\n",
334335
"### State\n",
335336
"\n",
@@ -346,9 +347,9 @@
346347
" question : str\n",
347348
" generation : str\n",
348349
" web_search : str\n",
349-
" documents : List[str]\n",
350+
" documents : List[Document]\n",
351+
"\n",
350352
"\n",
351-
"from langchain.schema import Document\n",
352353
"\n",
353354
"### Nodes\n",
354355
"\n",

0 commit comments

Comments
 (0)