From 4986e7227e8831df8a90c49ed4c6a3d53f9041d0 Mon Sep 17 00:00:00 2001 From: Zeeland Date: Tue, 13 Feb 2024 11:25:54 +0800 Subject: [PATCH] docs: rm unnecessary imports (#16876) - **Description:** optimize the document of memory usage - **Issue:** it lose some install guide --- docs/docs/integrations/memory/aws_dynamodb.ipynb | 2 -- .../memory/mongodb_chat_message_history.ipynb | 2 -- docs/docs/integrations/memory/remembrall.md | 6 ++++++ .../memory/sql_chat_message_history.ipynb | 14 +++----------- docs/docs/integrations/memory/sqlite.ipynb | 2 -- 5 files changed, 9 insertions(+), 17 deletions(-) diff --git a/docs/docs/integrations/memory/aws_dynamodb.ipynb b/docs/docs/integrations/memory/aws_dynamodb.ipynb index 32001587bfb..9410bbe024c 100644 --- a/docs/docs/integrations/memory/aws_dynamodb.ipynb +++ b/docs/docs/integrations/memory/aws_dynamodb.ipynb @@ -274,8 +274,6 @@ "metadata": {}, "outputs": [], "source": [ - "from typing import Optional\n", - "\n", "from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder\n", "from langchain_core.runnables.history import RunnableWithMessageHistory\n", "from langchain_openai import ChatOpenAI" diff --git a/docs/docs/integrations/memory/mongodb_chat_message_history.ipynb b/docs/docs/integrations/memory/mongodb_chat_message_history.ipynb index 8356154fcda..88771c7680f 100644 --- a/docs/docs/integrations/memory/mongodb_chat_message_history.ipynb +++ b/docs/docs/integrations/memory/mongodb_chat_message_history.ipynb @@ -133,8 +133,6 @@ "metadata": {}, "outputs": [], "source": [ - "from typing import Optional\n", - "\n", "from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder\n", "from langchain_core.runnables.history import RunnableWithMessageHistory\n", "from langchain_openai import ChatOpenAI" diff --git a/docs/docs/integrations/memory/remembrall.md b/docs/docs/integrations/memory/remembrall.md index 9cc03fd75e7..8f8b8187859 100644 --- a/docs/docs/integrations/memory/remembrall.md +++ b/docs/docs/integrations/memory/remembrall.md @@ -16,6 +16,12 @@ To get started, [sign in with Github on the Remembrall platform](https://remembr Any request that you send with the modified `openai_api_base` (see below) and Remembrall API key will automatically be tracked in the Remembrall dashboard. You **never** have to share your OpenAI key with our platform and this information is **never** stored by the Remembrall systems. +To do this, we need to install the following dependencies: + +```bash +pip install -U langchain-openai +``` + ### Enable Long Term Memory In addition to setting the `openai_api_base` and Remembrall API key via `x-gp-api-key`, you should specify a UID to maintain memory for. This will usually be a unique user identifier (like email). diff --git a/docs/docs/integrations/memory/sql_chat_message_history.ipynb b/docs/docs/integrations/memory/sql_chat_message_history.ipynb index 85939915672..e8cca612624 100644 --- a/docs/docs/integrations/memory/sql_chat_message_history.ipynb +++ b/docs/docs/integrations/memory/sql_chat_message_history.ipynb @@ -26,7 +26,7 @@ "The integration lives in the `langchain-community` package, so we need to install that. We also need to install the `SQLAlchemy` package.\n", "\n", "```bash\n", - "pip install -U langchain-community SQLAlchemy\n", + "pip install -U langchain-community SQLAlchemy langchain-openai\n", "```" ] }, @@ -71,10 +71,7 @@ "end_time": "2023-08-28T10:04:38.077748Z", "start_time": "2023-08-28T10:04:36.105894Z" }, - "collapsed": false, - "jupyter": { - "outputs_hidden": false - } + "collapsed": false }, "outputs": [], "source": [ @@ -97,10 +94,7 @@ "end_time": "2023-08-28T10:04:38.929396Z", "start_time": "2023-08-28T10:04:38.915727Z" }, - "collapsed": false, - "jupyter": { - "outputs_hidden": false - } + "collapsed": false }, "outputs": [ { @@ -137,8 +131,6 @@ "metadata": {}, "outputs": [], "source": [ - "from typing import Optional\n", - "\n", "from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder\n", "from langchain_core.runnables.history import RunnableWithMessageHistory\n", "from langchain_openai import ChatOpenAI" diff --git a/docs/docs/integrations/memory/sqlite.ipynb b/docs/docs/integrations/memory/sqlite.ipynb index 200335cc4df..21dde4e114b 100644 --- a/docs/docs/integrations/memory/sqlite.ipynb +++ b/docs/docs/integrations/memory/sqlite.ipynb @@ -119,8 +119,6 @@ "metadata": {}, "outputs": [], "source": [ - "from typing import Optional\n", - "\n", "from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder\n", "from langchain_core.runnables.history import RunnableWithMessageHistory\n", "from langchain_openai import ChatOpenAI"