The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
docs: Removed unwanted cell in refine segment (#22604)
Kirushikesh DBdb7e7b69e35a
diff --git a/docs/docs/tutorials/summarization.ipynb b/docs/docs/tutorials/summarization.ipynbindex e84216802a..20f4087ddb 100644--- a/docs/docs/tutorials/summarization.ipynb+++ b/docs/docs/tutorials/summarization.ipynb@@ -558,51 +558,6 @@"It's also possible to supply a prompt and return intermediate steps."]},- {- "cell_type": "code",- "execution_count": 22,- "id": "cc931bde-8258-4d10-8479-f2d2d69f49f4",- "metadata": {},- "outputs": [- {- "name": "stderr",- "output_type": "stream",- "text": [- "/Users/chestercurme/repos/langchain/libs/core/langchain_core/_api/deprecation.py:119: LangChainDeprecationWarning: The method `Chain.__call__` was deprecated in langchain 0.1.0 and will be removed in 0.2.0. Use invoke instead.\n",- " warn_deprecated(\n"- ]- }- ],- "source": [- "prompt_template = \"\"\"Write a concise summary of the following:\n",- "{text}\n",- "CONCISE SUMMARY:\"\"\"\n",- "prompt = PromptTemplate.from_template(prompt_template)\n",- "\n",- "refine_template = (\n",- " \"Your job is to produce a final summary\\n\"\n",- " \"We have provided an existing summary up to a certain point: {existing_answer}\\n\"\n",- " \"We have the opportunity to refine the existing summary\"\n",- " \"(only if needed) with some more context below.\\n\"\n",- " \"------------\\n\"\n",- " \"{text}\\n\"\n",- " \"------------\\n\"\n",- " \"Given the new context, refine the original summary in Italian\"\n",- " \"If the context isn't useful, return the original summary.\"\n",- ")\n",- "refine_prompt = PromptTemplate.from_template(refine_template)\n",- "chain = load_summarize_chain(\n",- " llm=llm,\n",- " chain_type=\"refine\",\n",- " question_prompt=prompt,\n",- " refine_prompt=refine_prompt,\n",- " return_intermediate_steps=True,\n",- " input_key=\"input_documents\",\n",- " output_key=\"output_text\",\n",- ")\n",- "result = chain({\"input_documents\": split_docs}, return_only_outputs=True)"- ]- },{"cell_type": "code","execution_count": 14,