diff --git a/docs/docs/versions/migrating_memory/long_term_memory_agent.ipynb b/docs/docs/versions/migrating_memory/long_term_memory_agent.ipynb index 8ab6f7be5fc61..eb5efff4ebd01 100644 --- a/docs/docs/versions/migrating_memory/long_term_memory_agent.ipynb +++ b/docs/docs/versions/migrating_memory/long_term_memory_agent.ipynb @@ -52,7 +52,7 @@ "metadata": {}, "outputs": [ { - "name": "stdin", + "name": "stdout", "output_type": "stream", "text": [ "OPENAI_API_KEY: ········\n", @@ -182,7 +182,10 @@ " documents = recall_vector_store.similarity_search(\n", " query, k=3, filter=_filter_function\n", " )\n", - " return [document.page_content for document in documents]" + " if not documents:\n", + " return []\n", + " else:\n", + " return [document.page_content for document in documents]" ] }, {