From e680762785cf39d4d7efdfa164c44ab04f15a5ac Mon Sep 17 00:00:00 2001 From: Jeff Tang <jeff.x.tang@gmail.com> Date: Thu, 25 Apr 2024 12:13:25 -0700 Subject: [PATCH] update based on PR feedback --- recipes/use_cases/LiveData.ipynb | 3 ++- recipes/use_cases/VideoSummary.ipynb | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/recipes/use_cases/LiveData.ipynb b/recipes/use_cases/LiveData.ipynb index 445215fc..5b71e61b 100644 --- a/recipes/use_cases/LiveData.ipynb +++ b/recipes/use_cases/LiveData.ipynb @@ -23,7 +23,8 @@ "!pip install llama-index-core\n", "!pip install llama-index-llms-replicate\n", "!pip install llama-index-embeddings-huggingface\n", - "!pip install tavily-python" + "!pip install tavily-python\n", + "!pip install replicate" ] }, { diff --git a/recipes/use_cases/VideoSummary.ipynb b/recipes/use_cases/VideoSummary.ipynb index f18eaf59..c2de08d0 100644 --- a/recipes/use_cases/VideoSummary.ipynb +++ b/recipes/use_cases/VideoSummary.ipynb @@ -32,7 +32,7 @@ "metadata": {}, "outputs": [], "source": [ - "!pip install langchain youtube-transcript-api tiktoken pytube" + "!pip install langchain youtube-transcript-api tiktoken pytube replicate" ] }, { @@ -260,7 +260,7 @@ "2. Loop over each subsequent sub-document, pass the previous summary with the current sub-document to generate a refined new summary;\n", "3. Return the final summary generated on the final sub-document as the final answer - the summary of the whole content.\n", "\n", - "An example prompt template for each call in step 2 is:\n", + "An example prompt template for each call in step 2, which gets used under the hood by LangChain, is:\n", "```\n", "Your job is to produce a final summary.\n", "We have provided an existing summary up to a certain point:\n", @@ -279,6 +279,8 @@ "metadata": {}, "outputs": [], "source": [ + "from langchain.chains.summarize import load_summarize_chain\n", + "\n", "chain = load_summarize_chain(llm, chain_type=\"refine\")\n", "chain.run(split_docs)" ] -- GitLab